easy one....

P

purplehaz

I looked thru my notes and in the vb help, but I can't find it. Can someone
remind me again how to do this.
I need the code to do this:

If cell a1 and cell a2 = blank, then do something

It's the AND part I'm stuck on. How do I get it to only do the action if
cell a1 and a2 = blank?

Thanks alot.
 
P

Peo Sjoblom

=IF(COUNTBLANK(A1:A2)=2,"do something","don't do something")


or using AND

=IF(AND(A1="",A2=""),"do something","don't do something")

Regards,

Peo Sjoblom
 
P

purplehaz

That's what I was looking for. Thanks alot.

Peo Sjoblom said:
=IF(COUNTBLANK(A1:A2)=2,"do something","don't do something")


or using AND

=IF(AND(A1="",A2=""),"do something","don't do something")

Regards,

Peo Sjoblom
 

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