IF statement AND OR ?

BJW75

New Member
Joined
Feb 18, 2020
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
Hello,

This seems like a softball but I cannot seem to get this formula to work using various forms with both, one or either AND OR combined IF statements. THe latest attempt is below:
=IF(AND(A23="prod 1",OR(A23="prod 2"),B23="waste"),J23," ")

A23 is a column of multiple product choices. In larger reporting (like quarter and year end reports), we combine all into 2 subgroups so several will fall into a larger category.
B23 is the location or what was found so this remains as one option
J23 is the value if true
blank if false

All iterations that I have tried return TRUE or blank. Any guidance is appreciated.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
i dont think your OR is doing anything there. OR(A23="prod 2") and just having A23="prod 2" should give the same result since there's just the one logical statement to check

if you're trying to say "if A23 is prod 1 or prod 2, and B23 is waste, then J23" i think it should look like
=IF(AND(OR(A23="prod 1", A23="prod 2"), B23="waste"),J23," ")
 
Upvote 0
That fixed it. I am still new to large logical statements, preferring statistical formulas and simple.
Thank you!
 
Upvote 0

Forum statistics

Threads
1,214,787
Messages
6,121,561
Members
449,038
Latest member
Guest1337

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top