easy one....

  • Thread starter Thread starter purplehaz
  • Start date Start date
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.
 
=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
 
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
 
Back
Top