Excel UPPER() / LOWER() instead of VBA UCase() or LCase()

James Snyder

Well-known Member
Joined
Jan 11, 2013
Messages
618
I am working in a macro and for the sake of speed would like to use the Excel UPPER() function instead of VBA's UCase(). I am failing to find it among the Excel objects. I thought it might be part of WorksheetFunction, but that is not the case. Is it useable from VBA?
 
Also you can use square brackets:
Code:
Sub UseUpper()
Dim a As String
a = [upper("James Snyder")]
Debug.Print a
End Sub
 
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
With regard to using "EVALUATE" in a macro; I have experimented with the approach discussed on Page 127-128 of the "Excel Gurus Gone Wild" book. As advertised, EVALUATE runs like the wind vs. a homegrown macro of mine that loops thru the selection of cells. Unfortunately, I have discovered that any cells containing formulas within the selected range ("rectangle") are converted to their underlying values. Is there a way to condition EVALUATE so that it skips cells containing formulas?
 
Upvote 0

Forum statistics

Threads
1,215,947
Messages
6,127,867
Members
449,410
Latest member
adunn_23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top