•1 min read•from Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community
How to use AND and OR conditions within the same formula
Our take
To create a formula that uses both AND and OR conditions effectively, you can combine these logical functions in a single expression. In your case, you want to check if cell A equals 0 and if cell B is either 0, 1, or 2. The formula you need is: `=AND(A1=0, OR(B1=0, B1=1, B1=2))`. This approach ensures that both conditions are evaluated correctly, yielding TRUE only when A is 0 and B matches one of the specified values. Feel free to reach out if you
Hello! I’m trying to write a formula with the following conditions:
If cell A=0 AND cell B=0 or cell B=1 or cell B=2 then the outcome is TRUE
It should be very simple, but I couldn’t figure it out. Thanks in advance.
Edit for clarity, the below is the condition I am after:
A = 0
AND
B is one of 0, 1, 2
[link] [comments]
Read on the original site
Open the publisher's page for the full experience
Related Articles
- Using AND and OR within the same formula - Part 2Thanks all for helping with a similar query earlier. I have another condition for the same dataset that I’m analysing. I would like the following: A = 0 AND B = one of 0, 1, 2 OR A=1 AND B = 0 or 1 Is it possible combine both of these into a single formula? Thank you submitted by /u/pinkdaisiesss [link] [comments]
- How do you write an IF formula that changes the value based on which range, out of two ranges, the original value fell in?I'm entering number values in Column A and I want Column B (where I'm inputting the formula) to populate either a 1 or a -1 based on which range (of two ranges) the value in Column A falls within. The conditions are: If Column A value is between 1-8, then Column B will be 1. If Column A value is between 9-21, then Column B will be -1. If Column A value is outside the two ranges (below 1 or above 21), then Column B can/should say something like FALSE. The formulas I've tried so far (and which failed) are: =IF(OR(AND(A2>=1,A2<=8),1)AND(A2>=9,A2<=21),-1) =IF(AND(A2<=1,A2>=8),1)OR(AND(A2>=9,A2<=21),-1)) Thank you in advance for all of your suggestions/help. submitted by /u/LifeisSuperFun21 [link] [comments]
- Need more than 3 outputsI’m looking for the cleanest way to add this. Having it feed from another sheet is open to consideration as well. Basically what I’m looking for is an IF OR formula for 3 conditions and 3 outcomes. If cell A1 is A the B1 will display as Yes If Cell A1 is B then B1 will display as No If cell A1 is C then B2 will display as maybe Any suggestions? submitted by /u/Amazing_Complaint_13 [link] [comments]
- Conditional Formatting with another cell?Hi everyone! I'm trying to create a condition where depending on the value of two cells, it will change the fill of one of them. For example, If Cell A is < 10% AND Cell B is X, then Cell A will be green. If it is > 10% and Cell B is X, then Cell A is red. How would I go about doing this? submitted by /u/Educational-Bass-413 [link] [comments]
Tagged with
#Excel alternatives for data analysis#AI formula generation techniques#rows.com#formula generator#natural language processing for spreadsheets#generative AI for data analysis#Excel compatibility#financial modeling with spreadsheets#Excel alternatives#formula#AND#OR#conditions#cell#outcome#TRUE#A#B#0#1