Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
aauugghhh...#div/o problems & various average formula problems | Excel Worksheet Functions | |||
change straight quotes to curly quotes | Excel Discussion (Misc queries) | |||
How do i get historical stock quotes using MSN Money Stock Quotes | Excel Discussion (Misc queries) | |||
Using CSV and quotes | Excel Discussion (Misc queries) | |||
Quotes | Excel Programming |