Using quotation marks

M

Mike Collard

I want to use the following formula in some code:

=and(a2>0,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
 
T

Tom Ogilvy

Let's test it in the immediate window:

ActiveCell.Formula = "=and(a2>0,c2="""")"
? activeCell.Formula
=AND(A2>0,C2="")


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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top