G
Guest
Using the format cell dialog box one can choose Custom Format and give the
format as
"String" ###0.0
The end result is a cell which has a number and text (String) in it, but
when you click on the contents of the cell you can only see the number and
cannot see the text (as it is in the format)
However I don't want to to do this manually for each cell as the string
changes for each cell.
I'm trying to figure out how a macro could set a custom format of a cell to
something like "String from RC[-5]" ###0.0
Using something like
X = "String from RC[-5] " & " ###0.0"
Y = "=RC[-11]"
ActiveCell = format(Y, X)
ends up showing both the string and the number in the cell, instead of
having the string in the format and not in the cell.
How can one put define a custom number format with a variable "String" in
the format?
format as
"String" ###0.0
The end result is a cell which has a number and text (String) in it, but
when you click on the contents of the cell you can only see the number and
cannot see the text (as it is in the format)
However I don't want to to do this manually for each cell as the string
changes for each cell.
I'm trying to figure out how a macro could set a custom format of a cell to
something like "String from RC[-5]" ###0.0
Using something like
X = "String from RC[-5] " & " ###0.0"
Y = "=RC[-11]"
ActiveCell = format(Y, X)
ends up showing both the string and the number in the cell, instead of
having the string in the format and not in the cell.
How can one put define a custom number format with a variable "String" in
the format?