Untitled
unknown
plain_text
3 years ago
517 B
8
Indexable
Sub SummarizeColumns()
Dim lastRow As Long
lastRow = ActiveSheet.Cells(Rows.Count, "Q").End(xlUp).Row
Dim col As Long
Dim startingCol As Long
startingCol = 17 'Q column
For i = 4 To lastRow
Cells(i, "G").Value = "" 'clear existing data in G column
col = startingCol
While Cells(1, col).Value = "VO"
Cells(i, "G").Value = Cells(i, "G").Value + Cells(i, col).Value
col = col + 2 'move to next column
Wend
Next i
End Sub
Editor is loading...