1
在Excel VBA中,我試圖通過Excel表循環,然後更新該行中的另一列。我希望通過其名稱來引用另一列,而不是在佈局更改的情況下使用偏移/數字。那可能嗎?VBA - 循環遍歷一個表並使用列名更新另一列
Dim rw As ListRow
Dim cl As Range
For Each rw In ActiveSheet.ListObjects("MasterData").ListRows
'Pseudo code:
if (rw[Notes] = "Test") then DO SOMETHING 'In this line I'd like to refer to the column called "Notes" but not sure how to do it.
Next rw