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.
我的数据集如下所示:
col1:1,4,5,6,24,6
col2:1,5,4,2,45,6
我想找到:
(col1[0] - col2[0]) 然后粘贴到 col3[0]
然后
(col1[1] - col2[1]) 然后粘贴到 col3[1]
大约 4000 个条目,直到没有更多的值。
我将如何在 excel 中使用宏或 VB 来做到这一点?提前致谢。
我才刚开始。做这个悉达多的正确方法是什么?
Option Explicit Sub minus() Dim lastRow As Integer, i As Integer lastRow = 7 With ActiveSheet For i = 1 To lastRow Range("C" & i).Formula = "=A" & i & "-B" & i Next i End With End Sub