Get Displayed Value Of a Cell
Msgbox Range("A1").Text
or, in your example:
For Each objC In Selection
objC.Value = objC.Text
Next
Regards
Trevor
"MDW" wrote in message
...
I'm trying to write a function that does the same thing as the "precision
as
displayed" setting, but only for a certain range (the selected cells). Is
there any way to get at the displayed value of a cell? I think that will
help
me accomplish what I want.
For instance, if the ACTUAL value of a cell is 76.5, but it's showing 77
on
the worksheet, I want to make the value of that cell 77.
Or, if the value of a cell is 13.362145, but it's showing 13.36, I want to
make the value of that cell 13.36.
Only, I don't want to do this for the entire sheet, just the selected
range.
I'm thinking that if I create a custom function that says
For Each objC In Application.Selection.Cells
objC.Value = objC.DisplayedValue
Next
Only, I can't seem to find what that "displayed value" property is.
Any help would be great. Thanks.
--
Hmm...they have the Internet on COMPUTERS now!
|