View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Duke Carey Duke Carey is offline
external usenet poster
 
Posts: 1,081
Default multiple IF statements

=if(j9={7,14,28,42},0,j9-d21*(j97))

Doesn't deal with the case that J9 = 56

If =56, use

=IF(J9={7,14,28,42},0,J9-D21*(J97))*(J9<56)

"Tom" wrote:

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!