Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
MES
 
Posts: n/a
Default How do I refer to a 'formula' instead of the result of that formu

I am trying to use a cell reference in one worksheet to a formula in another
worksheet, and want to use the formula itself instead of the result of that
formula, can anyone advise me how to do this?

  #2   Report Post  
Posted to microsoft.public.excel.misc
Chris Marlow
 
Posts: n/a
Default How do I refer to a 'formula' instead of the result of that formu

Hi,

I don't know if there is an existing Excel worksheet function to do this,
but the following VBA will;

Public Function ReturnFormula(Target As Range) As String

ReturnFormula = Target.Cells(1, 1).Formula

End Function

Regards,

Chris.

--
Chris Marlow
MCSD.NET, Microsoft Office XP Master


"MES" wrote:

I am trying to use a cell reference in one worksheet to a formula in another
worksheet, and want to use the formula itself instead of the result of that
formula, can anyone advise me how to do this?

  #3   Report Post  
Posted to microsoft.public.excel.misc
MES
 
Posts: n/a
Default How do I refer to a 'formula' instead of the result of that formu



"MES" wrote:

I am trying to use a cell reference in one worksheet to a formula in another
worksheet, and want to use the formula itself instead of the result of that
formula, can anyone advise me how to do this?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default How do I refer to a 'formula' instead of the result of that fo

This just returns the formula as a text, is there a way that it will
calculate the function instead of showing the contents?

"Chris Marlow" wrote:

Hi,

I don't know if there is an existing Excel worksheet function to do this,
but the following VBA will;

Public Function ReturnFormula(Target As Range) As String

ReturnFormula = Target.Cells(1, 1).Formula

End Function

Regards,

Chris.

--
Chris Marlow
MCSD.NET, Microsoft Office XP Master


"MES" wrote:

I am trying to use a cell reference in one worksheet to a formula in another
worksheet, and want to use the formula itself instead of the result of that
formula, can anyone advise me how to do this?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How do I refer to a 'formula' instead of the result of that fo

It is not clear to me what you want to do.

Can you post a formula and desribe what you want to do with it?

Maybe this UDF?

Function EvalCell(RefCell As String)
Application.Volatile
EvalCell = Evaluate(RefCell)
End Function

=evalcell(cellref)

Which does nothing more than return the value from the formula in cellref.

Just as easy to enter =cellref

Evalcell function is handy to return a value from a string such as

1+2+3


Gord Dibben MS Excel MVP

On Fri, 6 Nov 2009 16:35:01 -0800, fasta13
wrote:

This just returns the formula as a text, is there a way that it will
calculate the function instead of showing the contents?

"Chris Marlow" wrote:

Hi,

I don't know if there is an existing Excel worksheet function to do this,
but the following VBA will;

Public Function ReturnFormula(Target As Range) As String

ReturnFormula = Target.Cells(1, 1).Formula

End Function

Regards,

Chris.

--
Chris Marlow
MCSD.NET, Microsoft Office XP Master


"MES" wrote:

I am trying to use a cell reference in one worksheet to a formula in another
worksheet, and want to use the formula itself instead of the result of that
formula, can anyone advise me how to do this?


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
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Median result used in formula gives incorrect result vlatham Excel Worksheet Functions 4 September 21st 05 04:26 PM
Copy Paste of Formula Produces Incorrect Result JLa Excel Discussion (Misc queries) 1 May 17th 05 06:56 PM
Is there a formula to spell out a number in excel? Sha-nay-nay Excel Worksheet Functions 2 December 18th 04 09:25 PM
Convert Numeric into Text Monty Excel Worksheet Functions 0 December 18th 04 09:25 PM


All times are GMT +1. The time now is 05:59 AM.

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"