[英]Use Excel VBA Macro to Add values from one Column to another
let me know if this works 让我知道这个是否奏效
Sub CorporateAdd()
Application.ScreenUpdating = False
Dim TotalRows As Long
Dim UnclassArray As Variant, CorporateArray As Variant
TotalRows = Range("L1048576").End(xlUp).Row
UnclassArray = Columns("N")
CorporateArray = Columns("L")
For i = 4 To TotalRows
CorporateArray(i, 1) = CorporateArray(i, 1) + UnclassArray(i, 1)
Next i
Columns("L") = CorporateArray
'Uncomment this if you want it to automatically delete "Unclassified"
'Columns("N").Delete Shift:=xlLeft
Application.ScreenUpdating = True
End Sub
But for future reference, I don't think people like when you ask for code, try it out yourself first and if it doesn't work come here for help on fixing it! 但是,为了将来参考,我认为人们不喜欢在请求代码时先尝试一下,如果它不起作用,请寻求帮助来修复它! :) :)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.