Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default IF STATEMENT - NESTED

I am creating a spreadsheet to track pitch counts in Little League. There are
new rules about a number of days rest required depending on pitch counts. The
criteria is below:

If a player pitches 61 or more pitches in a day, three (3) calendar days of
rest must be observed.
If a player pitches 41 - 60 pitches in a day, two (2) calendar days of rest
must be observed.
If a player pitches 21 - 40 pitches in a day, one (1) calendar days of rest
must be observed.
If a player pitches 1-20 pitches in a day, no (0) calendar day of rest must
be observed.

I writing an IF statement to give the players next available date based on
this criteria. this is what I have so far - not sure where the error in my
formula is -it may be in the second IF part where I am looking for a range
between two number. My formula gives back TRUE.

cell D15 contains number of pitches, D9 is the date pitched.

=IF(D15=61,D$9+4,IF(D15=41,D15<=60,""))


Appreciate the help!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default IF STATEMENT - NESTED

Well, your syntax is wrong. You COULD use

=IF(D15=61,D$9+4,IF(AND(D15=41,D15<=60),""))

But that's not necessary because the second IF will only be executed if
D15<61, so you could write

=IF(D15=61,D$9+4,IF(D15=41,"","something else"))

BUT, I'd use

=D$9 + MIN(4,TRUNC((D15-1)/20)+1)



=IFIn article ,
tojo107 wrote:

I am creating a spreadsheet to track pitch counts in Little League. There are
new rules about a number of days rest required depending on pitch counts. The
criteria is below:

If a player pitches 61 or more pitches in a day, three (3) calendar days of
rest must be observed.
If a player pitches 41 - 60 pitches in a day, two (2) calendar days of rest
must be observed.
If a player pitches 21 - 40 pitches in a day, one (1) calendar days of rest
must be observed.
If a player pitches 1-20 pitches in a day, no (0) calendar day of rest must
be observed.

I writing an IF statement to give the players next available date based on
this criteria. this is what I have so far - not sure where the error in my
formula is -it may be in the second IF part where I am looking for a range
between two number. My formula gives back TRUE.

cell D15 contains number of pitches, D9 is the date pitched.

=IF(D15=61,D$9+4,IF(D15=41,D15<=60,""))


Appreciate the help!!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default IF STATEMENT - NESTED



=LOOKUP(D15,{1,21,41,61},{0,1,2,3})

will give number of days rest

so your result is .....

=D$9+LOOKUP(D15,{1,21,41,61},{0,1,2,3})+1

or

=D$9+LOOKUP(D15,{1,21,41,61},{1,2,3,4})

HTH


"tojo107" wrote:

I am creating a spreadsheet to track pitch counts in Little League. There are
new rules about a number of days rest required depending on pitch counts. The
criteria is below:

If a player pitches 61 or more pitches in a day, three (3) calendar days of
rest must be observed.
If a player pitches 41 - 60 pitches in a day, two (2) calendar days of rest
must be observed.
If a player pitches 21 - 40 pitches in a day, one (1) calendar days of rest
must be observed.
If a player pitches 1-20 pitches in a day, no (0) calendar day of rest must
be observed.

I writing an IF statement to give the players next available date based on
this criteria. this is what I have so far - not sure where the error in my
formula is -it may be in the second IF part where I am looking for a range
between two number. My formula gives back TRUE.

cell D15 contains number of pitches, D9 is the date pitched.

=IF(D15=61,D$9+4,IF(D15=41,D15<=60,""))


Appreciate the help!!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default IF STATEMENT - NESTED

Thanks all for you help - they all worked.

I found the Lookup easier - I have used VLOOKUP before but never this -
very cool.


Thanks Again...
"Toppers" wrote:



=LOOKUP(D15,{1,21,41,61},{0,1,2,3})

will give number of days rest

so your result is .....

=D$9+LOOKUP(D15,{1,21,41,61},{0,1,2,3})+1

or

=D$9+LOOKUP(D15,{1,21,41,61},{1,2,3,4})

HTH


"tojo107" wrote:

I am creating a spreadsheet to track pitch counts in Little League. There are
new rules about a number of days rest required depending on pitch counts. The
criteria is below:

If a player pitches 61 or more pitches in a day, three (3) calendar days of
rest must be observed.
If a player pitches 41 - 60 pitches in a day, two (2) calendar days of rest
must be observed.
If a player pitches 21 - 40 pitches in a day, one (1) calendar days of rest
must be observed.
If a player pitches 1-20 pitches in a day, no (0) calendar day of rest must
be observed.

I writing an IF statement to give the players next available date based on
this criteria. this is what I have so far - not sure where the error in my
formula is -it may be in the second IF part where I am looking for a range
between two number. My formula gives back TRUE.

cell D15 contains number of pitches, D9 is the date pitched.

=IF(D15=61,D$9+4,IF(D15=41,D15<=60,""))


Appreciate the help!!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default IF STATEMENT - NESTED

See if this works.

=IF(D15<21,D9,IF(D15<41,D9+1,IF(D15<61,D9+2,D9+3)) )

Mike

"tojo107" wrote:

I am creating a spreadsheet to track pitch counts in Little League. There are
new rules about a number of days rest required depending on pitch counts. The
criteria is below:

If a player pitches 61 or more pitches in a day, three (3) calendar days of
rest must be observed.
If a player pitches 41 - 60 pitches in a day, two (2) calendar days of rest
must be observed.
If a player pitches 21 - 40 pitches in a day, one (1) calendar days of rest
must be observed.
If a player pitches 1-20 pitches in a day, no (0) calendar day of rest must
be observed.

I writing an IF statement to give the players next available date based on
this criteria. this is what I have so far - not sure where the error in my
formula is -it may be in the second IF part where I am looking for a range
between two number. My formula gives back TRUE.

cell D15 contains number of pitches, D9 is the date pitched.

=IF(D15=61,D$9+4,IF(D15=41,D15<=60,""))


Appreciate the help!!



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
Nested IF statement Teri Excel Worksheet Functions 2 January 30th 07 06:40 PM
how to do a nested if statement Analyst Excel Discussion (Misc queries) 3 November 27th 06 11:22 PM
Nested IF/AND Statement buffgirl71 Excel Discussion (Misc queries) 1 October 10th 06 01:59 AM
Nested if then else statement tzip123 Excel Worksheet Functions 8 February 24th 06 05:38 PM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM


All times are GMT +1. The time now is 04:42 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"