Hi,
I would like to use the following code below on certain columns, but not all my columns are in the same order and I have to keep updating the code to reflect the correct columns all the time. Can someone please help me the the code below to it find the column with the header name: First Name, Last Name, and City? These are the three columns that I need to use the proper code below for all my excel files. Thank you
Sub Proper_AB()
Dim LR As Long, cell As Range
LR = Range("A" & Rows.Count).End(xlUp).Row
For Each cell In Range("A1:B" & LR)
cell.Value = StrConv(cell.Value, vbProperCase)
Next cell
End Sub
I would like to use the following code below on certain columns, but not all my columns are in the same order and I have to keep updating the code to reflect the correct columns all the time. Can someone please help me the the code below to it find the column with the header name: First Name, Last Name, and City? These are the three columns that I need to use the proper code below for all my excel files. Thank you
Sub Proper_AB()
Dim LR As Long, cell As Range
LR = Range("A" & Rows.Count).End(xlUp).Row
For Each cell In Range("A1:B" & LR)
cell.Value = StrConv(cell.Value, vbProperCase)
Next cell
End Sub