PDA

View Full Version : [SOLVED] To Uppercase



DragonWood
02-07-2017, 08:59 AM
Greetings,

I am trying to convert an array of cells to Uppercase. I don't understand why this isn't working. :banghead:



Function ToUppercase()


Dim CellsToCap As Variant
Dim varCell As Variant


Application.ScreenUpdating = False

'Capitalize these cells.
With ActiveWorkbook.Worksheets("Lists")

CellsToCap = Array("J3", "J5", "J7", "J9", "J11", "J13")


For Each varCell In CellsToCap
With .Range(varCell)
.Value = UCase(varCell.Value)
End With


Next varCell


End With

Application.ScreenUpdating = True


End Function


I appreciate any help you can provide.

Kenneth Hobs
02-07-2017, 09:46 AM
.Value = UCase(.Value)

DragonWood
02-07-2017, 11:25 AM
That worked. Thanks.