Hi I’m new to VBA and macro stuff, and wanted to know how best to go about the following:
I have some code that currently capitalises a range of cells. I want to change this however to only capitalise the contents before the last period in each cell.
So if for example I have:
Column A | Column B |
---|---|
TRUE | text1.new.txt |
Cell 3 | text2.new.txt |
What can I add to the following to ensure that when run, only the text before the last period is capitalised?
Sub UpdateNames()
If Range(“A1”) = True Then
Range(“B1:B100”) = [INDEX(UPPER(B1:B100),)]
End If
End Sub
Thanks!
New contributor
JHoliness is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.