View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default multiple IF statements

On Jul 27, 10:44 am, "Rick Rothstein \(MVP - VB\)"
wrote:
This should work...
=IF(MOD(J9,7)=0,0,J9-IF(J9<=7,0,D21))


I believe that returns 0 when J9=0, but the OP wants J9 when J9<7.

Therefore, I believe we must test J9<7 first. Note that this also
returns J9 when J9<0, which may or may not be want the OP intends, if
the OP even cares. But it does follow the OP's specifications.