excel - 复制值直到下一列的最后一整行
问题描述
我需要从 B1 复制列 B 上的一个单元格(假设是 A1)的值,直到列 C 中最后使用的行(假设是 C15 - 这意味着我需要从 B1 复制到 B15)
到目前为止,我没有任何代码 - 我是初学者
任何帮助都感激不尽!
解决方案
这可以使用 VBA 完成,如下所示
Sub fill()
'counting last row in Column C
lrow = Cells(Rows.Count, 3).End(xlUp).Row
'copying Range A1 to all cells on Column B until last row in Column C
Range(Cells(1, 2), Cells(lrow, 2)).Value = Cells(1, 1)
End Sub
推荐阅读
- shell - shell 脚本中的 Group_by 和 group_concat
- java - Java - 返回不同的方法
- data-visualization - 使用自定义 3D 模型进行地理空间数据可视化的工具
- docker-compose - Dockerized certbot 找不到挂载的目录
- kubernetes - 使用 CURL 获取系统的 Kubernetes API 测试:匿名问题
- image - 在颤振中使用 POST API 调用将图像传递给 REST
- ssl - nginx add ssl 接口并发测试耗时比http长10倍
- bootstrap-table - 如何在下拉列表更改时更改表的数据源
- python - Python:定期在线程中运行http请求
- python - youtube数据api,外语支持