Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
formula to value
In excel there when you edit a formula (press F2 in a cell with formula) and
than select whan of the arguments of that formula and press F9 you get value instead of formula. For instance there is a formula "=A1+A2+A3", by selecting A3 and pressing F9 you get "=A1+A2+25,36" where 25,36 is the value from A3. Is there a way to do something like that in vba, that is to change references to values in a formula? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
formula to value
I think you will need to provide more information on how you want this to
work. Is the user selecting a reference or are you going to do that in code? If in code, how does the code decide what reference to pick (or do you want them all)? Where is the value(s) being returned to (that is, are you changing the formula on the worksheet or just storing the value in a variable)? Any other information you can give us on how you want the code to interface with the formula in the cell would be helpful. -- Rick (MVP - Excel) "IgorM" wrote in message ... In excel there when you edit a formula (press F2 in a cell with formula) and than select whan of the arguments of that formula and press F9 you get value instead of formula. For instance there is a formula "=A1+A2+A3", by selecting A3 and pressing F9 you get "=A1+A2+25,36" where 25,36 is the value from A3. Is there a way to do something like that in vba, that is to change references to values in a formula? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
formula to value
Sub doit()
Let x = ActiveCell.Value ActiveCell.Value = x End Sub "IgorM" wrote: In excel there when you edit a formula (press F2 in a cell with formula) and than select whan of the arguments of that formula and press F9 you get value instead of formula. For instance there is a formula "=A1+A2+A3", by selecting A3 and pressing F9 you get "=A1+A2+25,36" where 25,36 is the value from A3. Is there a way to do something like that in vba, that is to change references to values in a formula? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Regression Leverage Formula (Jerry W. Lewis or Mike Middleton)already have DFITS formula | Excel Worksheet Functions | |||
copy formula down a column and have cell references change within formula | New Users to Excel | |||
Formula expected end of statement error, typing formula into cell as part of VBA macro | Excel Programming | |||
Excel 2002 formula displayed not value formula option not checked | Excel Worksheet Functions | |||
Commenting custom formula fields/formula on formula editor | Excel Programming |