View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default Extract portion of formula resident in a cell

You can't without using VBA or excel4 macros, why would you think that? You
can't have the cake and eat it, of course if you format the cell as text
before you type in the source formula you can do this, I doubt you want that
though

http://www.mvps.org/dmcritchie/excel/formula.htm


shows a UDF that will return the formula as a text string, then you can wrap
it in the RIGHT function


=RIGHT(getformula(B5),4)



--
Regards,

Peo Sjoblom





"JASelep" wrote in message
...
I want to extract a cell reference from a formula in a cell

I tried the right function referenceing the cell but it returns the right
portion of the function result

how do I specify it to extract the physical formula text in the cell and
not
the formula value in the cell?

example... a cell b5 contains the formula "='Execute Dealer Plan'!$P647"
which has a value of "select status"
if cell b6 contains formula "=right(b5,4) I'm wanting "P647" returned and
not "atus"



--
Jim