【发布时间】:2013-02-22 02:22:34
【问题描述】:
你好希望一切都好:) 无法弄清楚如何循环和选择下一个单元格 因此,当 h3:z3 范围内的单元格为空时,它将停止:)
它正在做的是从 h3 中选择值粘贴到 b3 运行另一个宏,该宏在 e3 中给出一个订单号,然后将其复制并粘贴到 h4 中,然后它将转到 I3 中的下一个单元格粘贴到 b3 副本中从 e3 得到结果并粘贴到 I4 中并执行相同的操作
谢谢
For Each cell In Range("H3:Z3")
If IsEmpty(cell.Value) Then Exit For
'select ammount and place in lookup
Range("H3").Select
Selection.Copy
Range("B3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
' fill in order numbers
bulkON_Click
'select order and past under postcode
Range("E3").Select
Application.CutCopyMode = False
Application.CutCopyMode = False
Selection.Copy
Range("H4").Select
ActiveSheet.Paste
Loop
【问题讨论】:
-
你有什么问题?