Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 177
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible? DakotaNJ Excel Worksheet Functions 25 September 18th 06 09:30 PM
Advanced formula - Return result & Show Cell Reference of result Irv Excel Worksheet Functions 7 May 6th 06 03:36 AM
How do I get a cell to show the result instead of the formula? harticd Excel Worksheet Functions 2 January 27th 06 04:03 PM
Instead of a negative number, I'd like to show zero... Dr. Darrell Excel Worksheet Functions 6 December 7th 05 08:21 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM


All times are GMT +1. The time now is 02:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"