LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Return formula as text

first enter this one-line UDF:

Function formuli(r As Range) As String
formuli = r.Formula
End Function

then if A1 contains:

=sometab!A34

=MID(formuli(A1),2,FIND("!",formuli(A1),1)-1)
will return:
sometab!

--
Gary''s Student - gsnu200736


"Paul Wittle" wrote:

Hi,

I have a load of cells which contain formula links to other tabs i.e.

='sometab'!A34

and of course they return the value of the cell. Further down I'm writing a
new formula and I don't want to re-write all the formulas, I would prefer to
return the tab as text a then create new references.

return the formula from above and cut it so it reads

'sometab'!

Then use indirect function to put the tab reference into the new forumlae.

Anyone know a walk around to return the formula NOT the value?
Cheers,
Paul.

 
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
Formula to return part of a text string luvthavodka Excel Discussion (Misc queries) 9 October 20th 08 05:27 PM
Link to text and return text into a formula? Mary Excel Worksheet Functions 5 June 22nd 07 01:49 PM
Return a text string when the result of VLOOKUP formula is #N/A jeremy nickels Excel Worksheet Functions 2 August 4th 06 05:26 PM
Return a formula as text string to a cell Sharon Excel Worksheet Functions 4 April 18th 06 05:40 PM
How to insert carriage return in the middle of a text formula to . Dave Excel Discussion (Misc queries) 2 March 17th 05 02:14 PM


All times are GMT +1. The time now is 03:32 PM.

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

About Us

"It's about Microsoft Excel"