Thanks to AlexJ for suggesting a great use for the REPT function – setting a minimum row height. He uses this technique to add a bit of spacing in his tables, so they’re easier to read.

感谢AlexJ为REPT功能提供了一个很好的建议-设置最小行高。 他使用这种技术在表中增加了一些间距,因此更易于阅读。

You can watch the steps in this video (or watch it on YouTube), and the step-by-step instructions are below the video.

您可以观看此视频中的步骤(或在YouTube上观看 ),分步说明在视频下方。

演示地址

在Excel列表中添加空间 (Add Space in an Excel List)

For example, here is my To Do list, with a few items to work on, around the house. Most of the Task Descriptions are short, and fit in a single line.

例如,这是我的待办事项清单,里面有一些待处理的物品。 大多数任务描述都很简短,可以放在一行中。

When I select all the rows, and use the AutoFit feature, either with the Ribbon command

当我选择所有行并使用“自动调整”功能时,可以使用功能区命令

or by double-clicking on the line between the row numbers,

或双击行号之间的行,

it squashes everything together.

它将所有东西压缩在一起。

The list is readable, but it would be easier on the eyes with a bit of white space at the top and bottom of each row.

该列表是可读的,但在每一行的顶部和底部都留有一些空白,这在眼睛上会更容易。

Yes, it’s a small detail, but if you’re staring at a long list all day, it could make a real difference in how blurry your eyes are, at the end of the day!

是的,这是一个很小的细节,但是如果您整天盯着一个长长的清单,那么到一天结束时,它可能会真正改变您的眼睛模糊!

使用REPT设置行高 (Use REPT To Set Row Height)

With AlexJ’s trick, you can add another column in the table, with a REPT formula.

使用AlexJ的技巧,您可以在表中添加带有REPT公式的另一列。

=REPT(CHAR(10),2)

= REPT(字符(10),2)

The CHAR function, with code 10, inserts a line break, so this example adds 2 line breaks in the cell.

代码为10 的CHAR函数插入一个换行符,因此此示例在单元格中添加了两个换行符。

看人物 (See the Characters)

You can hide the Spacing column, after you’ve set up the formula, so it doesn’t appear in the printed version.

设置公式后,您可以隐藏“间距”列,这样它就不会出现在打印版本中。

If you want to see something in the cell, you could add a character, such a a Pipe, so you remember that the cell isn’t empty

如果要在单元格中看到某些内容,可以添加一个字符,例如“管道”,以便记住单元格不为空

=REPT("|" & CHAR(10),2)

= REPT(“ |”&CHAR(10),2)

NOTE: After you add the formula, you might have to autofit the rows again, to see the effect. OR, select the spacing column, and turn Wrap Text off, then on again.

注意:添加公式后,可能必须再次自动调整行以查看效果。 或者,选择间距列,然后关闭“自动换行”,然后再次打开。

调整设置 (Adjust the Settings)

You can adjust the REPT formula, and the cell formatting, to control the row height. For example, change the number_times argument to 1, so the row height is shorter.

您可以调整REPT公式和单元格格式来控制行高。 例如,将number_times参数更改为1,因此行高较短。

Or, change the font to a smaller size, so there’s a little less white space.

或者,将字体更改为较小的字体,从而减少空白。

单元格上的图片 (Pictures Over Cells)

AlexJ sent me his REPT formula at the perfect time, because I found another need for it – setting a cell height for pictures.

AlexJ在最合适的时间向我发送了他的REPT公式,因为我发现还需要它-设置图片的像元高度。

In Excel, you can paste a picture onto a worksheet, but it floats over the sheet – it’s not really in a cell. If you want the pictures to move with the cell

在Excel中,您可以将图片粘贴到工作表上,但它会浮动在工作表上-并不是真正位于单元格中。 如果您希望图片随单元移动

  • make sure that the picture’s top left corner is inside the cell
    确保图片的左上角在单元格内
  • set its properties for “Move but don’t size with cells”
    将其属性设置为“移动但不随单元格调整大小”

If the pictures are properly positioned, they will sort with their row. But, if you do an Autofit on the row height, the picture height is ignored, and all the pictures can end up in a messy pile.

如果图片放置正确,它们将按行排序。 但是,如果对行高执行“自动调整”,则图片高度将被忽略,并且所有图片最终都会变成一团糟。

设置图片的行高 (Set Row Height for Pictures)

Instead of leaving the picture cells empty, use a REPT formula to set a minimum row height – I used 6 as the number_times argument in this table.

不要将图片单元格留空,而应使用REPT公式设置最小行高–我在表中使用6作为number_times参数。

Now I can autofit the rows, and they will never get shorter than the minimum height set by the REPT formula in the Picture column.

现在,我可以自动调整行,它们永远不会比“图片”列中REPT公式设置的最小高度短。

下载样本文件 (Download the Sample File)

You can download the sample file, to see how AlexJ’s technique works. Go to the AlexJ Sample Files page on my website, and in the Functions section, look for FN0001 – Set Minimum Row Height. The zipped file is in xlsx format, and does not contain macros.

您可以下载示例文件,以了解AlexJ的技术如何工作。 转到我网站上的AlexJ示例文件页面,然后在“功能”部分中查找FN0001 –设置最小行高 。 压缩文件为xlsx格式,不包含宏。

翻译自: https://contexturesblog.com/archives/2014/07/24/set-row-height-with-rept-function/

http://www.taodudu.cc/news/show-4208473.html

相关文章:

  • __rept__和__str__
  • xgboost算法_XGBoost算法背后的数学:尽可能简单地解释XGBoost算法背后的数学机制...
  • C++学习资料整理
  • 侯捷STL(一)
  • 腾讯开源云原生成本优化神器 - FinOps Crane
  • 如何在几百万qps的网关服务中实现灵活调度策略
  • 联邦学习概述与现状
  • Matlab数字图像处理学习记录【9】——表示与描述
  • 计算机原理探险系列(一)CPU
  • 字节跳动岗位薪酬体系曝光,看完感叹:不服不行,想高薪还得是学这个。。。。
  • Chapter2.4:数学模型考研参考题
  • 各种图片编码格式详解
  • 【docker】docker重新加载nginx配置
  • vue 父组件重新加载子组件
  • echarts 重新加载数据
  • js重新加载iframe框架
  • 页面重新加载(刷新页面)
  • Vue强制刷新页面重新加载数据方法
  • js重新加载页面的方法
  • Docker Nginx 如何重新加载配置
  • Linux 重新加载 nginx 配置命令
  • Vue刷新页面重新加载
  • vue 刷新、重新加载app
  • vue实现当前组件重新加载
  • 关于vue的组件重新加载
  • iframe 重新加载
  • IDEA中Tomcat重新加载的几种方式
  • DataTables如何重新加载数据
  • Spring Boot中的配置文件使用以及重新加载
  • vue 点击当前路由怎么重新加载_Vue 路由切换时页面内容没有重新加载的解决方法...

使用REPT功能设置行高相关推荐

  1. html5设置单元格行高,单元格的行高怎么设置 EXCEL文档怎么统一设置行高

    我要把有几行设置为同样的高度,可是一行一行的拉,太慢了. 在Excel中,如何设置表格最合适的行高.列宽? EXCEL中的单元格行高不够怎么调整可以自动调整,根据字的内容来调整: 请问怎么统一设置EX ...

  2. 怎样让表格的行高一样_excel表格多数据如何设置行高-Excel EXCEL中如何把行高平均成一样高...

    excel表格如何设置行高 1.本次操作的软件为Excel电格,软件版本为office和学生版2016. 2.首先打开Excel电子表格,根据问题描述,我们格中输入用于演示设置表格最合适的行高列宽的数 ...

  3. html table设置行高_单元格的行高怎么设置 html语言怎么设置设置表格行高?

    在Excel中,如何设置表格最合适的行高.列宽? 本次操作使用的软件为Excel电子表格,软件版本为office家庭和学生版2016. 小编只是难过不能陪你一起到老,再也没有机会,看到你的笑. 请问怎 ...

  4. xlsx怎么设置行高列宽_Excel表格中如何设置行高和列宽?

    回答: 在Excel2010工作表中设置行高和列宽只需选中内容所在的几列或几行再点击开始选项卡,再点击功能区中的单元格按钮,在弹出的项目中点击格式按钮,继续在弹出的菜单项中点击自动调整列宽或行高即可. ...

  5. ag-grid 学习笔记三:ag-grid设置(定义列、选择行、复选框、设置行高列宽、置顶合计行、底部合计行、行组、客户端排序)

    目录 一 定义列 二 选择行 三 设置复选框 四 设置行高列宽 五 置顶合计行 六 底部合计行 七 行组 八 客户端排序 一 定义列 表格的列有如下常用属性. 名称 说明 headerName 显示的 ...

  6. 赛效:wps表格怎么设置行高和列宽?

    在使用WPS表格时,通常会用到调整表格行高和列宽的功能,很多办公人想要实现行高和列宽会根据表格中的内容进行调整,在使用WPS表格时怎么设置行高和列宽呢? 下面,我们以图文教程的形式给大家全面演示下WP ...

  7. excel表格行宽列高怎么设置_excel表格怎么设置行高列宽

    excel表格怎么设置行高列宽 你是怎么调整Excel表格的行高和列宽的? 如果还在用原始的手动调整方法,那你赶紧看看下面这几种解决方法,不仅效率高,而且调整的行高和列宽还很统一整齐哦,快和小编来学习 ...

  8. android+listview设置行高,android – 无法在行xml中设置listView行高的高度

    这是我的自定义适配器的getView方法: public View getView(int position, View convertView, ViewGroup viewGroup) { Sin ...

  9. [VBA] 设置行高和列宽,以及全选单元格

    一.用VBA设置行高和列宽 1.将选定区域内各单元格的行高和列宽设置为指定的数值: Sub SetSpecified()With ActiveWindow.RangeSelection.ColumnW ...

最新文章

  1. 合理设置apache参数
  2. Linux 环境安装 Node、nginx、docker、vsftpd、gitlab
  3. maven工程servlet实例之jar包冲突解决
  4. 工程化,模块化,组件化,规范化
  5. Serverless 落地挑战与蚂蚁金服实践
  6. 书呆子rico_来自书呆子总书呆子的6条阅读建议
  7. L1-031 到底是不是太胖了 (10 分)—团体程序设计天梯赛
  8. 保险公司智能运营系统——软件需求规格说明
  9. MySQL常用数据字典表设计
  10. 微信小程序父子组件传值
  11. 绿色奖学金申请答辩PPT模板
  12. python re模块的(...),group(),groups()
  13. 百合网网页html,百合网 免费攻略!新手体验记!
  14. Office安装时遇到的问题
  15. 所有的伟大都源于一次勇敢的开始
  16. 中国医科大学2021年12月《中医护理学基础》作业考核试题
  17. du和df的使用及区别
  18. “十四五”规划强调交通强国,Apollo智能交通快步走
  19. SAP LDQ本地数据队列
  20. STM32H7xx 串口DMA发送接收(LL库)

热门文章

  1. PHP红包搭建步骤,PHP 生成微信红包代码简单
  2. 测绘资质专业类别及乙级作业限制范围是什么?
  3. 10 Java基础笔记-封装
  4. 让你一遍就会的【单纯形法解线性规划最优】
  5. IOS6区别于IOS5的几个不明显的改变
  6. ol3 加载天地图服务
  7. SCP,NFS,TFTP的初步认识
  8. 鸟与虫(四)pexels搜到的我都想要,
  9. deepin 安装git
  10. mysql 联合主键优缺点_mysql索引的类型和优缺点