View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Matilda Matilda is offline
external usenet poster
 
Posts: 57
Default Multiple tests for a condition

A simple nested if! Negated.

Didn't occur to me... thanks Gordon!

"Gordon Rainsford" wrote:

Matilda wrote:

Dear All,

I want to execute a statement if two cells meet the same condition (ie not
empty).

Basically, I want the vba syntax for the formula

if(or(A1, B1, <""), doThing, doNoThing)

Many TIAs

Matilda


If Not IsEmpty(Range("a1")) Then
If Not IsEmpty(Range("b1")) Then
dostuff
End If
End If


--
Gordon Rainsford

London UK