ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   multiple if/then formulas (https://www.excelbanter.com/excel-discussion-misc-queries/192773-multiple-if-then-formulas.html)

Lisa

multiple if/then formulas
 
Hello, I have quite a long formula that I'm not sure how to write up. All my
questions have been answered so far so I know someone will come through.
thanks

If A2= 15 look at B1, if b1 has "IN", then b2 should read "IN", if b1 has
"out" then look at A3 and A4, if A3, & A4 are = 15 then b2 should read "IN"
, if either a3&a4 are under 15 then b2 shoud read out

If a2<15, look at b1, if b1 has "OUT", then b2 should read "Out", if b1 has
"in" then look at a3 and a4, if a3 & a4 are <15 then b2 should read "Out" if
either a3 or a4 =15 then b2 should read "IN"

If a2 = "0" or "looks blank", then look at b1, if b1 is "in" then b2 should
be "in" if b1 reads "out" then b2 should be out

Results should look like:
A B
1 In
2 15 In
3 9 in
4 16 in
5 9 out
6 21 out
7 2 out
8 0 out


Roger Govier[_3_]

multiple if/then formulas
 
Hi Lisa

I think the following does what you need
=IF(A2=15,
IF(B1="in","In",
IF(AND(A3=15,A4=15),"In","Out")),
IF(B1="out","out",
IF(AND(A3<15,A4<15),"Out","In")))

The formula should all be a single line, I have made line breaks to make it
easier to read, and to prevent the newsreader breaking the formula at an
awkward point.

However, according to your logic, I don't agree with your posted outcome for
cells B5 and B6. I believe they should both return In.
--
Regards
Roger Govier

"Lisa" wrote in message
...
Hello, I have quite a long formula that I'm not sure how to write up. All
my
questions have been answered so far so I know someone will come through.
thanks

If A2= 15 look at B1, if b1 has "IN", then b2 should read "IN", if b1 has
"out" then look at A3 and A4, if A3, & A4 are = 15 then b2 should read
"IN"
, if either a3&a4 are under 15 then b2 shoud read out

If a2<15, look at b1, if b1 has "OUT", then b2 should read "Out", if b1
has
"in" then look at a3 and a4, if a3 & a4 are <15 then b2 should read "Out"
if
either a3 or a4 =15 then b2 should read "IN"

If a2 = "0" or "looks blank", then look at b1, if b1 is "in" then b2
should
be "in" if b1 reads "out" then b2 should be out

Results should look like:
A B
1 In
2 15 In
3 9 in
4 16 in
5 9 out
6 21 out
7 2 out
8 0 out



All times are GMT +1. The time now is 04:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com