Thread: IF function
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Toppers
 
Posts: n/a
Default IF function

There is a limit of 7 nested if functions and you have reached it.

"Inspector" wrote:

Can someone tell me why this formula gives me an error message? It works for
0 thru 5 but when i add the sixth or more it errors out.
Thanks, John

=IF(10-COUNTBLANK(F3:O3)=0,TRUNC(SUM(F3:O3)+C3),
IF(10-COUNTBLANK(F3:O3)=1,TRUNC((SUM(F3:O3)+C3*20)/30),
IF(10-COUNTBLANK(F3:O3)=2,TRUNC((SUM(F3:O3)+C3*10)/30),
IF(10-COUNTBLANK(F3:O3)=3,TRUNC(SUM(F3:O3)/30),
IF(10-COUNTBLANK(F3:O3)=4,TRUNC(SUM(F3:O3)/40),
IF(10-COUNTBLANK(F3:O3)=5,TRUNC(SUM(F3:O3)/50),
IF(10-COUNTBLANK(F3:O3)=6,TRUNC(SUM(F3:O3)/60,""))))))