Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Problems with quotes

Can some one please show me the proper syntax for this:

ActiveCell.Formula = "=IF(A1=0,,(TEXT(A1, 'mm-yy-dd' )& '-' & ROW(A1)))"

With single quotes inside double quotes, the function returns a '1004'
defined error, with double - double quotes the compliler returns an error.

The formula works correctly when typed directly into the cell.

The result of the formula should be 10-29-04-1 if the date in A1 is 10/29/04
and blank otherwise.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Problems with quotes

Hi

One quote is two quotes in code.

ActiveCell.Formula = "=IF(A1=0,"""",(TEXT(A1,""mm-yy-dd"")&""-""& ROW(A1)))"

HTH. Best wishes Harald

"Lee Hunter" skrev i melding
...
Can some one please show me the proper syntax for this:

ActiveCell.Formula = "=IF(A1=0,,(TEXT(A1, 'mm-yy-dd' )& '-' & ROW(A1)))"

With single quotes inside double quotes, the function returns a '1004'
defined error, with double - double quotes the compliler returns an error.

The formula works correctly when typed directly into the cell.

The result of the formula should be 10-29-04-1 if the date in A1 is

10/29/04
and blank otherwise.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Problems with quotes

Thank you, sir. Much appreciated.

"Harald Staff" wrote:

Hi

One quote is two quotes in code.

ActiveCell.Formula = "=IF(A1=0,"""",(TEXT(A1,""mm-yy-dd"")&""-""& ROW(A1)))"

HTH. Best wishes Harald

"Lee Hunter" skrev i melding
...
Can some one please show me the proper syntax for this:

ActiveCell.Formula = "=IF(A1=0,,(TEXT(A1, 'mm-yy-dd' )& '-' & ROW(A1)))"

With single quotes inside double quotes, the function returns a '1004'
defined error, with double - double quotes the compliler returns an error.

The formula works correctly when typed directly into the cell.

The result of the formula should be 10-29-04-1 if the date in A1 is

10/29/04
and blank otherwise.




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
aauugghhh...#div/o problems & various average formula problems acbel40 Excel Worksheet Functions 5 October 19th 09 05:00 PM
change straight quotes to curly quotes callico Excel Discussion (Misc queries) 2 June 22nd 07 10:23 PM
How do i get historical stock quotes using MSN Money Stock Quotes Ash Excel Discussion (Misc queries) 0 May 11th 06 03:26 AM
Using CSV and quotes Neil Excel Discussion (Misc queries) 4 October 31st 05 07:59 PM
Quotes PastorMike Excel Programming 1 May 4th 04 03:58 PM


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