IF and OR formulas

E

ExcelBeginner

I'm having trouble with my formulas. I'm trying to get excel to autopopulate
certain cells with information using IF statements however I also need to
imbed OR statements otherwise the information isn't autopopulated correctly.
For example:
If A2=L and A3=L then A1 goes into cell B5 OR if B2=L and B3=L then B1 goes
into cell B5.
So what I need is a statement that'll allow me to use IF, AND and OR
statements all at the same time.
Can anyone give me a forumla that'll work? Can excel even do this?
Thanks.
 
P

Pete_UK

Put this formula in B5:

=IF(AND(A2="L",A3="L"),A1,IF(AND(B2="L",B3="L"),B1,"neither"))

You didn't specify what should happen if neither conditions are true,
so this returns the word neither - you could change it to "" if you
want a blank result.

Hope this helps.

Pete
 
B

bj

there is a priority issue here
if A2:B3 all equal L, then does A1 or B1 be entered in B5?
what do you want in B5 otherwise
If there is no chance of A2:B3 all being L
then
in B5
=if(and(A2="L",A3="L"),A1,if(and(B2="L",B3="L"),B1,"Otherwise"))
 
T

Toppers

=IF(AND(A2="L",A3="L"),A1,IF(AND(B2="L",B3="L"),B1,"otherwise"))



What happens if neither condition is true .."otherwise"?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top