LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default multiple IF statements

Nice catch!!! I think this formula will account for all of the conditions...

D20: =IF(MOD(J9,14-7*(J9=7))<0,J9-IF(J9<=7,0,D21),0)

or, in slightly shorter form, this one...

D20: =(MOD(J9,14-7*(J9=7))<0)*(J9-D21*(J9=7))

While the formula produces values for J9<0 and J9=56, we are not in a
position to know what the OP wanted to happen there as he left his
intentions unstated.

Rick


"Duke Carey" wrote in message
...
Rick & Joe -

The OP's specs omit 21 and 35 as conditions where he wants a zero result,
so your solutions incorporating MOD() will be erroneous

"Rick Rothstein (MVP - VB)" wrote:

This should work...

=IF(MOD(J9,7)=0,0,J9-IF(J9<=7,0,D21))

Rick


"Tom" wrote in message
...
Hi gang,
my head is spinning around...what would be the best way to write this
one?
In cell D20:

IF J9<7,D20=J9
IF J9=7,D20=0
IF J97<14,D20=J9-D21
IF J9=14, D20=0
IF J914<28,D20=J9-D21
IF J9=28, D20=0
IF J928<42,D20=J9-D21
IF J9=42, D20=0
IF J942<56, D20=J9-D21

thanks in advance!






 
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 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
sum of multiple IF statements Snap Excel Worksheet Functions 9 June 8th 06 11:11 PM
multiple if statements Alex McKenzie Excel Discussion (Misc queries) 3 November 21st 05 09:35 AM
multiple IF statements Nathan McElmurry Excel Worksheet Functions 1 November 18th 04 09:22 PM


All times are GMT +1. The time now is 06:11 AM.

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"