复制值直到下一列的最后一整行

copy value until last full row in next column

我需要从 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