View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Greg[_17_] Greg[_17_] is offline
external usenet poster
 
Posts: 9
Default Running macro when cell contains text

Hi Tom
Thankyou for your reply, I had a bit of trouble working out what was
going wrong as the macro would not reformat the list correctly. I
(after some time) worked out that some of the items I was wanting to
reformat were not in lowercase so I included a macro before yours to
first make the whole list lowercase. I found this one in another post.
Once again thankyou
Greg

Sub Lower_Case()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim Cell As Range
On Error Resume Next 'In case no cells in selection
For Each Cell In Intersect(Selection, _
Selection.SpecialCells(xlConstants, xlTextValues))
Cell.Formula = LCase(Cell.Formula)
Next
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub