在 Python 中,我可以使用 zip 函数一次遍历多个列表。我将如何在 Excel 中的 VBA 中的宏中执行此操作?
伪代码
Set ones = Worksheets("Insertion").Range("D2:D673")
Set twos = Worksheets("Insertion").Range("A2:A673")
Set threes = Worksheets("Insertion").Range("B2:B673")
Set fours = Worksheets("Insertion").Range("C2:C673")
For Each one, two, three, four in zip(ones.Cells, twos.Cells, threes.Cells, fours.Cells)
Debug.Print(one.Text & two.Text & three.Text & four.Text)
Next one
Run Code Online (Sandbox Code Playgroud)