Filling cell with lowercase "true" and "false" without an apostrophe

flatman

New Member
Joined
Sep 5, 2014
Messages
2
What's the equivalent to this in VBA?
=Lower("TRUE")
Copy -> paste_special -> Values

The above gives me the lowercase value "true" in the cell without a leading apostrophe.

I tried a bunch of things in VBA including:
Range("A1").Value = LCase("TRUE")

But each time the result ends up uppercase. Adding an apostrophe is not a solution for me as I the 3rd party tool that reads my resulting excel file does not like uppercase and it does not like the leading apostrophe.

Thanks!
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
This seems to work...

Code:
Range("A1").NumberFormat = "@"
Range("A1").Value = "true"
 
Upvote 0
I don't know what you mean by leading apostrophe. Try puting the word "TRUE" in a variable and instanciate the variable as a string first.
Dim var as string
var = "TRUE"
Range("A1").value = LCase(var)
 
Upvote 0
If you put a leading apostrophe before a value in Excel, it makes it TEXT and the reason you would do that is because TRUE and FALSE are boolean values that Excel displays in uppercase.
WarPiglet, your solution will not work unless you make the cell in text format like Rick did.
 
Upvote 0
Not sure why lcase isn't working for you there are a couple of things you could try. I would try assigning "TRUE" to a string variable and then apply the lcase function to this variable and see if it makes any difference. Alternatively you could get excel to insert a column next to the column containing the values you want to make lowercase and then getting vba to put a formula using the lower function in this column before making this column values and deleting the column with the original upper case entries.
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,971
Members
452,371
Latest member
Frana

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