Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Quotes in Macro Formula

Hi
this should be a quick one! im trying to put a formula in a cell ie
ActiveCell.Formula = "=CONCATENATE(TEXT(A1,"yyyy/mm/dd"))"

However as i have to put double quotes in for the date format excel
thinks it is at the end of the line, how can i put in the double quotes
without this happening?

ActiveCell.Formula = "=CONCATENATE(TEXT(A1," & chr0022 & "yyyy/mm/dd"
& chr0022 & "))"

or something like this?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Quotes in Macro Formula

ActiveCell.Formula = "=CONCATENATE(TEXT(A1,""yyyy/mm/dd""," something to
concatenate with))"

"Shorty" a écrit dans le message de
ups.com...
Hi
this should be a quick one! im trying to put a formula in a cell ie
ActiveCell.Formula = "=CONCATENATE(TEXT(A1,"yyyy/mm/dd"))"

However as i have to put double quotes in for the date format excel
thinks it is at the end of the line, how can i put in the double quotes
without this happening?

ActiveCell.Formula = "=CONCATENATE(TEXT(A1," & chr0022 & "yyyy/mm/dd"
& chr0022 & "))"

or something like this?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Quotes in Macro Formula

ActiveCell.Formula = "=CONCATENATE(TEXT(A1,""yyyy/mm/dd""))"

double quotes within quotes

--
Regards,
Tom Ogilvy


"Shorty" wrote in message
ups.com...
Hi
this should be a quick one! im trying to put a formula in a cell ie
ActiveCell.Formula = "=CONCATENATE(TEXT(A1,"yyyy/mm/dd"))"

However as i have to put double quotes in for the date format excel
thinks it is at the end of the line, how can i put in the double quotes
without this happening?

ActiveCell.Formula = "=CONCATENATE(TEXT(A1," & chr0022 & "yyyy/mm/dd"
& chr0022 & "))"

or something like this?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Quotes in Macro Formula

No need for concatenate

ActiveCell.Formula = "=TEXT(A1,""yyyy/mm/dd"")"

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Shorty" wrote in message
ups.com...
Hi
this should be a quick one! im trying to put a formula in a cell ie
ActiveCell.Formula = "=CONCATENATE(TEXT(A1,"yyyy/mm/dd"))"

However as i have to put double quotes in for the date format excel
thinks it is at the end of the line, how can i put in the double quotes
without this happening?

ActiveCell.Formula = "=CONCATENATE(TEXT(A1," & chr0022 & "yyyy/mm/dd"
& chr0022 & "))"

or something like this?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Quotes in Macro Formula

Thanks guys ive removed the concatenate (from a previous used formula,
doh!) and the double quotes are working great!
Thanks again,
Shorty

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
change straight quotes to curly quotes callico Excel Discussion (Misc queries) 2 June 22nd 07 10:23 PM
Quotes in .formula calcs Paulymon Excel Programming 1 February 28th 06 11:14 PM
Quotes in formula Kevin Excel Programming 1 December 2nd 03 05:53 PM
Formula with quotes and ampersand Neil[_11_] Excel Programming 3 November 10th 03 07:49 AM
Excel macro to get stock quotes off the www Bob Benjamin Excel Programming 1 November 3rd 03 03:39 AM


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