Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Formula within formula

I think this is quite a simple one

i am using a macro to put a formula in a cell, however as it contains speech marks (") it does not work, is there a way to get it to understand the speechmarks within the outer speech marks are part of the formula i want typed in the cell

Worksheets("Customer Form").Range("C13").Formula = "=IF(Data!K11 = "New Manager", "Please Overtype With Name Of New Manager","")"
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Formula within formula

"=IF(Data!K11 = ""New Manager"", ""Please Overtype With Name Of New
Manager"","""")"

verify in the immediate window:

? "=IF(Data!K11 = ""New Manager"", ""Please Overtype With Name Of New
Manager"","""")"
=IF(Data!K11 = "New Manager", "Please Overtype With Name Of New Manager","")

so a doubled speech marks within a string produce a single speech mark.

--
Regards,
Tom Ogilvy

Emma Hope wrote in message
...
I think this is quite a simple one,

i am using a macro to put a formula in a cell, however as it contains

speech marks (") it does not work, is there a way to get it to understand
the speechmarks within the outer speech marks are part of the formula i want
typed in the cell?

Worksheets("Customer Form").Range("C13").Formula = "=IF(Data!K11 = "New

Manager", "Please Overtype With Name Of New Manager","")"


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Formula within formula

Emma,

Try this:

Worksheets("Customer Form").Range("C13").Formula = _
"=IF(Data!K11 = ""New Manager"", ""Please Overtype With Name Of New
Manager"","""")"


John

"Emma Hope" wrote in message
...
I think this is quite a simple one,

i am using a macro to put a formula in a cell, however as it contains

speech marks (") it does not work, is there a way to get it to understand
the speechmarks within the outer speech marks are part of the formula i want
typed in the cell?

Worksheets("Customer Form").Range("C13").Formula = "=IF(Data!K11 = "New

Manager", "Please Overtype With Name Of New Manager","")"


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Formula within formula

Thanks Tom & John, that works great!!
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
Regression Leverage Formula (Jerry W. Lewis or Mike Middleton)already have DFITS formula PJ[_3_] Excel Worksheet Functions 2 June 2nd 10 03:45 PM
copy formula down a column and have cell references change within formula brad New Users to Excel 5 May 13th 07 04:38 PM
Build excel formula using field values as text in the formula val kilbane Excel Worksheet Functions 2 April 18th 07 01:52 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


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