I have data in Col E. I would like a macro to convert the text from row 2 onwards into proper case
I have data in Col E. I would like a macro to convert the text from row 2 onwards into proper case
Code:Sub ConvertToProper() Dim lng As Long lng = Cells(Rows.Count, "E").End(xlUp).Row Range("E2:E" & lng).Value = Evaluate("=IF(E2:E" & lng & "<>"""",PROPER(E2:E" & lng & "),"""")") End Sub
A dream is not something you see when you are asleep, but something you strive for when you are awake.
It's usually a bad idea to say that something can't be done.
The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve
Join us at Facebook
Thanks for the help, much appreciated
You can shorten that Evaluate statement slightly by doing it this way...Code:Sub ConvertToProper() Dim lng As Long lng = Cells(Rows.Count, "E").End(xlUp).Row Range("E2:E" & lng).Value = Evaluate("=IF(E2:E" & lng & "<>"""",PROPER(E2:E" & lng & "),"""")") End Sub
Code:Sub ConvertToProper() Dim lng As Long lng = Cells(Rows.Count, "E").End(xlUp).Row Range("E2:E" & lng).Value = Evaluate("IF(ROW(),PROPER(E2:E" & lng & "))") End Sub
Hi Rick, thanks for your input-much appreciated
Bookmarks