View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Daisy
 
Posts: n/a
Default Combining Nested IF statement with Between operator

I'm trying to create a nested IF function that evaluates 3 conditions
and returns 1 of 3 possible "true" answers. I think I've gotten close
but I'm probably missing a comma or parentheses somewhere.

Here's the scenario:
Excel 2000, Windows XP
Column A contains employee names
Column B contains hours accrued
Column C contains a formula that evaluates three different conditions
based on the value in Column B

The example below assumes the formula is in cell C10:
If B10=20 or <=40, then multiply B10*4 and divide by 80
If B10<20 then the answer is 0
If B1040 then the answer is 2

Here's the formula I created first:

=IF(B10=20,B10*4/80,IF(B1040,2,IF(B10<20,0)))

What I'm missing is the between part (i.e. the first part should read
if B10=20 and <=40). I tried to insert the AND operator in the
following formula, but it doesn't work:

=IF(AND(B10=20,B10<=40),B10*4/80,IF(B1040,2,IF(B10<20,0)))

Any help would be greatly appreciated.