Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default return formula in cell as string

Hi,

Is there a way to return the formula of a cell as a string in another cell?
--
Thanks for your help.
Karen53
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default return formula in cell as string

Hi Karen,

Dim strFormula As String

Range("A13").FormulaR1C1 = "=SUM(R[-12]C:R[-1]C)"

strFormula = Range("A13").Formula

Range("A14") = "'" & strFormula

--
Regards,

OssieMac


"Karen53" wrote:

Hi,

Is there a way to return the formula of a cell as a string in another cell?
--
Thanks for your help.
Karen53

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default return formula in cell as string

Thanks OssieMac
--
Thanks for your help.
Karen53


"OssieMac" wrote:

Hi Karen,

Dim strFormula As String

Range("A13").FormulaR1C1 = "=SUM(R[-12]C:R[-1]C)"

strFormula = Range("A13").Formula

Range("A14") = "'" & strFormula

--
Regards,

OssieMac


"Karen53" wrote:

Hi,

Is there a way to return the formula of a cell as a string in another cell?
--
Thanks for your help.
Karen53

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default return formula in cell as string

Activecell.Value = "'" & Range("C1").Formula

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Karen53" wrote in message
...
Hi,

Is there a way to return the formula of a cell as a string in another
cell?
--
Thanks for your help.
Karen53



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 to return a value for a portion of a text string in a cell NanGio Excel Discussion (Misc queries) 2 January 29th 09 10:36 PM
Formula to return part of a text string luvthavodka Excel Discussion (Misc queries) 9 October 20th 08 05:27 PM
return empty string value if cell is blank Nat Excel Discussion (Misc queries) 2 April 1st 08 08:55 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


All times are GMT +1. The time now is 08:40 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"