Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望 excel 上的 VBA 宏代码执行以下操作:
例如,我有列“C”,其中包含一些具有值的单元格,还有什么是空的,所以,我想要通过宏,选择列“C”,然后查看具有值的单元格,然后:
对于每个具有值的单元格,我想将公式写入位于 F、H、J 列中的每个单元格:并且行号取决于“具有值的那个单元格”
我花了很多时间来寻找类似的东西,但没有任何帮助..
Dim Row As Range For Each Row In Me.Range("C1:J1000").Rows If Not Row.Range("A1").Value = "" Then Row.Range("D1").Formula = "SomeFormula" Row.Range("F1").Formula = "SomeFormula" Row.Range("H1").Formula = "SomeFormula" End If Next