![]() |
Multiple if statements
Need some help again please.
G1 contains a list box, contained in the list box: OFF 1 2 3 4 5 6 7 N6 will contain the if statements: If G1=Off will return a statement in cell N6 of OFF If G1=1 (1-6) will return a statement in cell N6 of WORK If G1=7 will return a statement in cell N6 of REST 24 HOURS The following formula does not work: =if(and(g1="OFF","OFF"),if(g10,g1<7,"WORK"),if(g1 ="7","REST 24 HOURS")) of course i have tried each number with own if statement but ran into that proverbial 7 if statements. Any advice, input would be valuable, thanks in advance. Doug |
Multiple if statements
hi
try it this way.... =IF(G1="off","off",IF(AND(G10,G1<7),"work",IF(G1= 7,"Rest 24 Hours",0))) if G1 contains anything other than Off, 1,2,3,4,5,6 or 7, then the results will be 0(zero). adjust the zero to suit. Regards FSt1 "v1rt8" wrote: Need some help again please. G1 contains a list box, contained in the list box: OFF 1 2 3 4 5 6 7 N6 will contain the if statements: If G1=Off will return a statement in cell N6 of OFF If G1=1 (1-6) will return a statement in cell N6 of WORK If G1=7 will return a statement in cell N6 of REST 24 HOURS The following formula does not work: =if(and(g1="OFF","OFF"),if(g10,g1<7,"WORK"),if(g1 ="7","REST 24 HOURS")) of course i have tried each number with own if statement but ran into that proverbial 7 if statements. Any advice, input would be valuable, thanks in advance. Doug |
Multiple if statements
How about simply:
=IF(G1="Off","OFF",IF(G1=7,"REST 24 HOURS","Work")) It appears there are really only 3 responses: OFF when G1="Off" REST 24 HOURS when G1 is 7 and "WORK" when G1 =1, 2, 3, 4, 5 or 6 "v1rt8" wrote: Need some help again please. G1 contains a list box, contained in the list box: OFF 1 2 3 4 5 6 7 N6 will contain the if statements: If G1=Off will return a statement in cell N6 of OFF If G1=1 (1-6) will return a statement in cell N6 of WORK If G1=7 will return a statement in cell N6 of REST 24 HOURS The following formula does not work: =if(and(g1="OFF","OFF"),if(g10,g1<7,"WORK"),if(g1 ="7","REST 24 HOURS")) of course i have tried each number with own if statement but ran into that proverbial 7 if statements. Any advice, input would be valuable, thanks in advance. Doug |
Multiple if statements
Thank you FSt1 for the quick and accurate response. Imagine 4 hours on this
and less than 10 minutes it is fixed. Doug "FSt1" wrote: hi try it this way.... =IF(G1="off","off",IF(AND(G10,G1<7),"work",IF(G1= 7,"Rest 24 Hours",0))) if G1 contains anything other than Off, 1,2,3,4,5,6 or 7, then the results will be 0(zero). adjust the zero to suit. Regards FSt1 "v1rt8" wrote: Need some help again please. G1 contains a list box, contained in the list box: OFF 1 2 3 4 5 6 7 N6 will contain the if statements: If G1=Off will return a statement in cell N6 of OFF If G1=1 (1-6) will return a statement in cell N6 of WORK If G1=7 will return a statement in cell N6 of REST 24 HOURS The following formula does not work: =if(and(g1="OFF","OFF"),if(g10,g1<7,"WORK"),if(g1 ="7","REST 24 HOURS")) of course i have tried each number with own if statement but ran into that proverbial 7 if statements. Any advice, input would be valuable, thanks in advance. Doug |
Multiple if statements
JLatham, Thank you for your quick response, I have used your formula and
resolved the issue. Doug "JLatham" wrote: How about simply: =IF(G1="Off","OFF",IF(G1=7,"REST 24 HOURS","Work")) It appears there are really only 3 responses: OFF when G1="Off" REST 24 HOURS when G1 is 7 and "WORK" when G1 =1, 2, 3, 4, 5 or 6 "v1rt8" wrote: Need some help again please. G1 contains a list box, contained in the list box: OFF 1 2 3 4 5 6 7 N6 will contain the if statements: If G1=Off will return a statement in cell N6 of OFF If G1=1 (1-6) will return a statement in cell N6 of WORK If G1=7 will return a statement in cell N6 of REST 24 HOURS The following formula does not work: =if(and(g1="OFF","OFF"),if(g10,g1<7,"WORK"),if(g1 ="7","REST 24 HOURS")) of course i have tried each number with own if statement but ran into that proverbial 7 if statements. Any advice, input would be valuable, thanks in advance. Doug |
Multiple if statements
hi doug
thanks for the feedback. regards FSt1 "v1rt8" wrote: Thank you FSt1 for the quick and accurate response. Imagine 4 hours on this and less than 10 minutes it is fixed. Doug "FSt1" wrote: hi try it this way.... =IF(G1="off","off",IF(AND(G10,G1<7),"work",IF(G1= 7,"Rest 24 Hours",0))) if G1 contains anything other than Off, 1,2,3,4,5,6 or 7, then the results will be 0(zero). adjust the zero to suit. Regards FSt1 "v1rt8" wrote: Need some help again please. G1 contains a list box, contained in the list box: OFF 1 2 3 4 5 6 7 N6 will contain the if statements: If G1=Off will return a statement in cell N6 of OFF If G1=1 (1-6) will return a statement in cell N6 of WORK If G1=7 will return a statement in cell N6 of REST 24 HOURS The following formula does not work: =if(and(g1="OFF","OFF"),if(g10,g1<7,"WORK"),if(g1 ="7","REST 24 HOURS")) of course i have tried each number with own if statement but ran into that proverbial 7 if statements. Any advice, input would be valuable, thanks in advance. Doug |
All times are GMT +1. The time now is 01:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com