Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default 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




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple If Statements Tigerwould Excel Worksheet Functions 6 May 16th 08 11:49 AM
Multiple IF statements looking up multiple ranges. mike Excel Worksheet Functions 7 August 9th 07 04:55 PM
Multiple if statements with multiple conditions egarcia Excel Discussion (Misc queries) 4 January 29th 07 10:46 PM
Using multiple IF statements Jshendel Excel Discussion (Misc queries) 8 August 29th 06 09:04 PM
multiple IF statements Nathan McElmurry Excel Worksheet Functions 1 November 18th 04 09:22 PM


All times are GMT +1. The time now is 10:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"