# Thread: If? And? Or? Or something else?

1. ## If? And? Or? Or something else?

I'd really appreciate some help with this, please.

I'm trying to put a value into a target cell. It looks at two other cells to decide what value should be there. There are three possible values, D, M and E.

Put D in the target cell if any of these conditions are true:
H3=2 and N3<3
H3=3 and N3<6
H3=4 and N3<9
H3=5 and N3<12
H3=6 and N3<15

Put M in the target cell if any of these conditions are true:
H3=2 and N3<4
H3=3 and N3<7
H3=4 and N3<10
H3=5 and N3<13
H3=6 and N3<16

Put E in the target cell if any of these conditions are true:
H3=2 and N3<5
H3=3 and N3<8
H3=4 and N3<11
H3=5 and N3<14
H3=6 and N3<17

I am completely stumped with this one. I can get it to put D in the cell if H3=5 and N3 < 12 using =IF(AND(H3=5,N3<12),"D"). I tried using OR to add more conditions and it just falls over.  Reply With Quote

2. Try

=IF(AND(H3>=2,H3<=6),IF(N3<3*(H3-1),"D",IF(N3<3*(H3-1)+1,"M",IF(N3<3*(H3-1)+2,"E","No match"))),"No match")  Reply With Quote

#### Tags for this Thread

if and or #### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•