Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
formula to show a formula in a different cell
How do I get a formula to show info from the formula used in a different cell?
A1 =sheet name!*f33 B1 =formula to tell me the sheet name used in A1's formula Thanks, Todd |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
formula to show a formula in a different cell
Two options:
1) put an apostrophe to the left of the formula in A1, copy and paste the entire text string int0 B1, or 2) Create a UDF with the following code: Function GetFormula(Cell As Range) As String GetFormula = Cell.Formula If Cell.HasArray Then GetFormula = "{" & GetFormula & "}" End Function To create a UDF, right-click on the tab, select view code, and then in the left hand pane navigate to your workbook. Inset a module, paste the above code into the module, save, close out of the visual basic editor, go back to B2 and enter =getformula(A1) and watch your formula appear. Dave -- Brevity is the soul of wit. "Todd" wrote: How do I get a formula to show info from the formula used in a different cell? A1 =sheet name!*f33 B1 =formula to tell me the sheet name used in A1's formula Thanks, Todd |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is it possible? | Excel Worksheet Functions | |||
Advanced formula - Return result & Show Cell Reference of result | Excel Worksheet Functions | |||
How do I get a cell to show the result instead of the formula? | Excel Worksheet Functions | |||
Instead of a negative number, I'd like to show zero... | Excel Worksheet Functions | |||
Cell doesn't show formula result - it shows formula (CTRL + ' doe. | Excel Worksheet Functions |