Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Using quotation marks

I want to use the following formula in some code:

=and(a20,c2="") but I can't figure out how to use
additional single and double quotation marks to surround
the existing quotes to make it work.

I would use isblank(c2) instead of c2="" but that doesn't
work. The spreadsheet has been exported from Access and
although the cell appears empty, isblank only works if I
highlight the cell, press F2 to edit and then hit enter -
so there's soemthing hidden in the cell. If there is a
way of forcing the blank cells to really be blank then I
could use isblank. Hope this makes sense.

Thanks for any help

Mike Collard
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default Using quotation marks

Mike

Use two double quotes

..Formula = "=AND(A10,C2="""")"

See also http://www.dicks-blog.com/excel/2004...eet_formu.html

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Mike Collard" wrote in message
...
I want to use the following formula in some code:

=and(a20,c2="") but I can't figure out how to use
additional single and double quotation marks to surround
the existing quotes to make it work.

I would use isblank(c2) instead of c2="" but that doesn't
work. The spreadsheet has been exported from Access and
although the cell appears empty, isblank only works if I
highlight the cell, press F2 to edit and then hit enter -
so there's soemthing hidden in the cell. If there is a
way of forcing the blank cells to really be blank then I
could use isblank. Hope this makes sense.

Thanks for any help

Mike Collard



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Using quotation marks

Hi
try something like
activecell.formula="=and(a20,c2="""")"

-----Original Message-----
I want to use the following formula in some code:

=and(a20,c2="") but I can't figure out how to use
additional single and double quotation marks to surround
the existing quotes to make it work.

I would use isblank(c2) instead of c2="" but that doesn't
work. The spreadsheet has been exported from Access and
although the cell appears empty, isblank only works if I
highlight the cell, press F2 to edit and then hit enter -
so there's soemthing hidden in the cell. If there is a
way of forcing the blank cells to really be blank then I
could use isblank. Hope this makes sense.

Thanks for any help

Mike Collard
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Using quotation marks

Tried both suggestions already but no good.


-----Original Message-----
Hi
try something like
activecell.formula="=and(a20,c2="""")"

-----Original Message-----
I want to use the following formula in some code:

=and(a20,c2="") but I can't figure out how to use
additional single and double quotation marks to surround
the existing quotes to make it work.

I would use isblank(c2) instead of c2="" but that

doesn't
work. The spreadsheet has been exported from Access and
although the cell appears empty, isblank only works if I
highlight the cell, press F2 to edit and then hit enter -


so there's soemthing hidden in the cell. If there is a
way of forcing the blank cells to really be blank then I
could use isblank. Hope this makes sense.

Thanks for any help

Mike Collard
.

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Using quotation marks

Let's test it in the immediate window:

ActiveCell.Formula = "=and(a20,c2="""")"
? activeCell.Formula
=AND(A20,C2="")


Hmmmm . . . , Seems to work perfectly for everyone else.

--
Regards,
Tom Ogilvy

wrote in message
...
Tried both suggestions already but no good.


-----Original Message-----
Hi
try something like
activecell.formula="=and(a20,c2="""")"

-----Original Message-----
I want to use the following formula in some code:

=and(a20,c2="") but I can't figure out how to use
additional single and double quotation marks to surround
the existing quotes to make it work.

I would use isblank(c2) instead of c2="" but that

doesn't
work. The spreadsheet has been exported from Access and
although the cell appears empty, isblank only works if I
highlight the cell, press F2 to edit and then hit enter -


so there's soemthing hidden in the cell. If there is a
way of forcing the blank cells to really be blank then I
could use isblank. Hope this makes sense.

Thanks for any help

Mike Collard
.

.



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
Quotation Marks 9pluck9 Excel Discussion (Misc queries) 2 May 2nd 07 04:40 PM
Quotation Marks? LinearChaos Excel Worksheet Functions 2 June 25th 06 10:31 PM
without quotation marks? jfazz Excel Discussion (Misc queries) 1 March 2nd 06 04:43 PM
Quotation Marks - When and What?? heski Excel Discussion (Misc queries) 2 February 7th 06 12:40 PM
quotation marks JohnF Excel Worksheet Functions 7 February 5th 06 09:33 PM


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