So I'm trying to write an IF/OR formula so that when cell (J$4 = [value or value2]) it would pull a certain value. However, when it is blank I want it to default to 0, but it would not. It would pull the value even if blank. Any help would be greatly appreciated.
formula:
=IFERROR(IF(OR(J$4="1120S",1120),INDEX(B1HY3!$A$3:$F$300,MATCH("L 1",B1HY3!$F$3:$F$300,0),5),0),0)
Instead of:
=IFERROR(IF(OR(J$4="1120S",1120),INDEX(B1HY3!$A$3:$F$300,MATCH("L 1",B1HY3!$F$3:$F$300,0),5),0),0)
You should use:
=IFERROR(IF(OR(J$4="1120S",J$4=1120),INDEX(B1HY3!$A$3:$F$300,MATCH("L 1",B1HY3!$F$3:$F$300,0),5),0),0)
Notice the change from:
OR(J$4="1120S",1120)
to:
OR(J$4="1120S",J$4=1120)
See more at: OR() function - Office Support
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.