Please help me understand and modify this macro.
My colleague wrote the macro listed below. It works just fine. Now I would like to add column P to do the same time. Can someone explain the If and null string part of the macro and help me modify it. I would like to learn this, so in the future I can write my very own.
Thank you in advance.
My colleague wrote the macro listed below. It works just fine. Now I would like to add column P to do the same time. Can someone explain the If and null string part of the macro and help me modify it. I would like to learn this, so in the future I can write my very own.
Thank you in advance.
HTML:
Application.ScreenUpdating = False
With ActiveSheet
'' Sort Ascending Column O so all the items are grouped together
.UsedRange.Sort Key1:=Range("o2"), Header:=xlYes
'' Fill Columns S-Z with "_" if O is not blank
For i = 2 To .UsedRange.rows.Count
If .Cells(i, "o") <> vbNullString Then .Cells(i, "S").Resize(, 8) = "_"
Next
End With
Application.ScreenUpdating = True