![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
Question:
Can I put an OR statement inside an IF formula? if yes how would you use that? Thanks in advance |
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
=IF(OR(A1="X",A1="Y"),A1*B1,0) which says: if A1 is either equal to "X" or equal to "Y", give the result of A1*B1, otherwise 0 in the cell where this formula is. |
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
=IF(OR(A1=1,B1=2),A1*B1,A1)
|
|
|
|
|
|
#4 |
|
New Member
Join Date: Feb 2002
Posts: 15
|
for example put in b1:
=IF(OR(A1=1,A1=2),"y","n") If a1 contains 1 or 2 then you get y else n Eli |
|
|
|
|
|
#5 |
|
Guest
Posts: n/a
|
I am using the Conditional Format
After selecting columnB,I typed in =OR(c1="",c1="Test") eg. change text in columnB to white if c1="" or c1=Test However, it doesn't work Should I add more statment in the formula Thanks guys |
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
=OR(ISBLANK(C1),C1="Test") |
|
|
|
|
|
|
#7 |
|
Guest
Posts: n/a
|
Yes it works
Thanks guys, I am very appreciated |
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|