Untitled

Anonymous
plain_text
01/26/2023 11:53 AM
540 B
14
Indexable
Sub SummarizeColumns()
   Dim lastRow As Long
   lastRow = ActiveSheet.Cells(Rows.Count, "Q").End(xlUp).Row
   If Cells(1, "Q").Value = "VO" Then
       For i = 4 To lastRow
               Cells(i, "G").Value = Cells(i, "Q").Value + Cells(i, "S").Value
       Next i
   Else
       For i = 4 To lastRow
               Cells(i, "G").Value = Cells(i, "S").Value
       Next i
   End If
End Sub
Editor is loading...