Thread: OR in IF
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default OR in IF

The or is a function like this with each condition separated by a comma:-

=IF(OR(A4=1,B4=2,C4=3),"Yes","No")

--
Regards,

OssieMac


"T2net" wrote:

Do you know a way to include several conditions to one IFstep in VBA,
ie

If condition1 OR condition2 OR condition3 then action1
without using my current unelegant and heavy:

If condition1 then action1
If condition 2 then action1
If condition 3 then action1


I am sure the trick is easy..so easy that I cannot find it!

Thanks in advance for your help,

T2net