SyntaxFix
Write A Post
Hire A Developer
Questions
You can search column before assignments:
Dim col_n as long for i = 1 to NumCols if Cells(1, i).Value = "column header you are looking for" Then col_n = i next for i = 1 to NumRows Cells(i, col_n).Value = "PHEV" next i