can i display the formula in just one cell?

bigdan

Well-known Member
Joined
Oct 5, 2009
Messages
846
Office Version
  1. 2013
Platform
  1. Windows
im dealing w/ a looong formula. i've tried evaluating the formula, which has helped, but i still need to go thru it myself. if i click show formulas ALLL the formulas on the page appear, and this page is pure formulas, so everything gets unreadable. is there some way to show the formula for just this one cell?

btw one thing ive done to make reading this formula is to name the cells being used as opposed to their references (what's this called? cell reference?). but i believe in some cases these names you assign are at the sheet level, some are at workbook leve. how do you toggle?
 
Last edited:

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
edit - further to above, lets say one of my cells refers to the relevant part of the range of another column. eg A1 references data in C1, A2 in C2 etc. can i name C1:C5 "Data" and yet refer to it in the formulas in col A?

meaning, in A1 I'd like to replace every mention of C1 with "Data", same in C2 etc, but I'd still want A1 to refer to C1 (not the whole C1:C5 range). would Excel know where to look?

i hope this was coherent. dont blame you if not clear, if you're willing to help but not quite sure please let me know which part is confusing.
 
Upvote 0
can be done with UDF

Code:
Function GetFormula(Cell as Range) as String
   GetFormula = Cell.Formula
End Function

use it like this: =getformula(Cell)
 
Upvote 0
can be done with UDF

Code:
Function GetFormula(Cell as Range) as String
   GetFormula = Cell.Formula
End Function

use it like this: =getformula(Cell)

thanks for this, not sure what you're doing there though man :) if i was to type that formula into the cell i'm trying to see the formula of, wouldn't that erase the formula? ie if the loooong text is in A1, and i typed your code in A1 instead, the original value would be lost.

are you suggesting putting this into another cell? actually that didnt occur to me. but if so couldnt i just copy the original formula into another cell and precede it with an apostrophe?
 
Upvote 0
UDF means UserDefinedFuntion the code has to go into a VBA module of your workbook

Usage: Examples using GetFormula
=GetFormula(A1) --> Display the formula used in cell A1
=personal.xls!getformula(A1) --> invoke macro from another workbook
=GetFormula(sheet150!A1) --> get the formula used on another worksheet
=GetFormula('sheet one'!A1) --> other sheetname has spaces
=GetFormula([WBName.xls]WSName!A1) --> from another workbook with caution
 
Upvote 0
hahaha that was quite complicated (at my level that is) but i see where you're coming from. thanks for the help bud.
 
Upvote 0
Do you know that you can change the height of your formula bar? Make it high enough to show all of your formula.
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,293
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top