Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #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.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Niek Otten
 
Posts: n/a
Default Combining Nested IF statement with Between operator

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

--
Kind regards,

Niek Otten

"Daisy" wrote in message
ups.com...
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.



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

Wow, that was fast! I tried it and it worked. Many thanks and have a
happy holiday!

  #4   Report Post  
Junior Member
 
Posts: 1
Talking

Thanks - really helped me out of a tight spot today and fast. Many thanks
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
Problem with nested IF_OR statement DOOGIE Excel Worksheet Functions 7 June 24th 05 03:27 AM
Nested If statement Jock W Excel Worksheet Functions 3 March 22nd 05 06:56 PM
combining an if statement Ryder Excel Worksheet Functions 3 March 9th 05 06:21 PM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM
Combining SUM Function with Nested If Statement Somecallmejosh Excel Discussion (Misc queries) 3 December 6th 04 04:25 PM


All times are GMT +1. The time now is 08:24 AM.

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

About Us

"It's about Microsoft Excel"