Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get Displayed Value Of a Cell
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! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get Displayed Value Of a Cell
Range("A1").Text
is what you want as against .Value. -- HTH RP (remove nothere from the email address if mailing direct) "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! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get Displayed Value Of a Cell
Wow, I can't believe that one went over my head. I almost feel silly.
Thanks guys - works like a charm! "Bob Phillips" wrote: Range("A1").Text is what you want as against .Value. -- HTH RP (remove nothere from the email address if mailing direct) "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! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get Displayed Value Of a Cell
You're welcome. Thanks for the feedback.
"MDW" wrote in message ... Wow, I can't believe that one went over my head. I almost feel silly. Thanks guys - works like a charm! "Bob Phillips" wrote: Range("A1").Text is what you want as against .Value. -- HTH RP (remove nothere from the email address if mailing direct) "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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Displayed results in a cell | Excel Discussion (Misc queries) | |||
Cell Displayed Does Not Equal Cell Copied | Excel Worksheet Functions | |||
Can multiple cell results be displayed in a single cell? | Excel Discussion (Misc queries) | |||
Text wider than one cell is not displayed in the next empty cell | Excel Discussion (Misc queries) | |||
displayed cell values | Excel Worksheet Functions |