#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Inspector
 
Posts: n/a
Default IF function

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,""))))))
  #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,""))))))

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Duke Carey
 
Posts: n/a
Default IF function

maybe

=IF(AND(COUNTBLANK(F3:O3)3,COUNTBLANK(F3:O3)<8),T RUNC(SUM(F3:O3)/(10*(10-COUNTBLANK(F3:O3)))),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),""))))


"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,""))))))

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Inspector
 
Posts: n/a
Default IF function

I actually have to continue up to IF 10-COUNTBLANK =10

"Duke Carey" wrote:

maybe

=IF(AND(COUNTBLANK(F3:O3)3,COUNTBLANK(F3:O3)<8),T RUNC(SUM(F3:O3)/(10*(10-COUNTBLANK(F3:O3)))),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),""))))


"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,""))))))

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

If the formulas for 7 to 10 follow those of 3 to 6 then Duke's solution would
work with a minor modification.

What are those for 7 to 10?

"Inspector" wrote:

I actually have to continue up to IF 10-COUNTBLANK =10

"Duke Carey" wrote:

maybe

=IF(AND(COUNTBLANK(F3:O3)3,COUNTBLANK(F3:O3)<8),T RUNC(SUM(F3:O3)/(10*(10-COUNTBLANK(F3:O3)))),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),""))))


"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,""))))))



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Inspector
 
Posts: n/a
Default IF function

Each cell in F3:O3 represents a total of 10 games of bowling/day. F3:J3
would be 5 days or 50 games for the month of Nov. K3:O3 would be 5 days
or 50 games in Dec. All these games may or may not be bowled. I'm good for
the first 5 IF's but just need to continue it to 10 IF's, F3:O3.

"Toppers" wrote:

If the formulas for 7 to 10 follow those of 3 to 6 then Duke's solution would
work with a minor modification.

What are those for 7 to 10?

"Inspector" wrote:

I actually have to continue up to IF 10-COUNTBLANK =10

"Duke Carey" wrote:

maybe

=IF(AND(COUNTBLANK(F3:O3)3,COUNTBLANK(F3:O3)<8),T RUNC(SUM(F3:O3)/(10*(10-COUNTBLANK(F3:O3)))),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),""))))


"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,""))))))

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

what i wanted to know was:

IF(10-COUNTBLANK(F3:O3)=7,TRUNC(SUM(F3:O3)/70?
IF(10-COUNTBLANK(F3:O3)=8,TRUNC(SUM(F3:O3)/80?
?
?

"Inspector" wrote:

Each cell in F3:O3 represents a total of 10 games of bowling/day. F3:J3
would be 5 days or 50 games for the month of Nov. K3:O3 would be 5 days
or 50 games in Dec. All these games may or may not be bowled. I'm good for
the first 5 IF's but just need to continue it to 10 IF's, F3:O3.

"Toppers" wrote:

If the formulas for 7 to 10 follow those of 3 to 6 then Duke's solution would
work with a minor modification.

What are those for 7 to 10?

"Inspector" wrote:

I actually have to continue up to IF 10-COUNTBLANK =10

"Duke Carey" wrote:

maybe

=IF(AND(COUNTBLANK(F3:O3)3,COUNTBLANK(F3:O3)<8),T RUNC(SUM(F3:O3)/(10*(10-COUNTBLANK(F3:O3)))),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),""))))


"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,""))))))

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Arvi Laanemets
 
Posts: n/a
Default IF function

Hi

=TRUNC((SUM(F3:O3)+CHOOSE(11-COUNTBLANK(F3:O3),C3,C3*20,C3*10,0,0,0,0,0,0,0,0))/CHOOSE(11-COUNTBLANK(F3:O3),1,30,30,30,40,50,60,70,80,90,100 ))

(There can be up to 28 options in CHOOSE function)


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"Inspector" wrote in message
...
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,""))))))



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Inspector
 
Posts: n/a
Default IF function

Yes, that is correct

"Toppers" wrote:

what i wanted to know was:

IF(10-COUNTBLANK(F3:O3)=7,TRUNC(SUM(F3:O3)/70?
IF(10-COUNTBLANK(F3:O3)=8,TRUNC(SUM(F3:O3)/80?
?
?

"Inspector" wrote:

Each cell in F3:O3 represents a total of 10 games of bowling/day. F3:J3
would be 5 days or 50 games for the month of Nov. K3:O3 would be 5 days
or 50 games in Dec. All these games may or may not be bowled. I'm good for
the first 5 IF's but just need to continue it to 10 IF's, F3:O3.

"Toppers" wrote:

If the formulas for 7 to 10 follow those of 3 to 6 then Duke's solution would
work with a minor modification.

What are those for 7 to 10?

"Inspector" wrote:

I actually have to continue up to IF 10-COUNTBLANK =10

"Duke Carey" wrote:

maybe

=IF(AND(COUNTBLANK(F3:O3)3,COUNTBLANK(F3:O3)<8),T RUNC(SUM(F3:O3)/(10*(10-COUNTBLANK(F3:O3)))),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),""))))


"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,""))))))

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Inspector
 
Posts: n/a
Default IF function

thank you

"Arvi Laanemets" wrote:

Hi

=TRUNC((SUM(F3:O3)+CHOOSE(11-COUNTBLANK(F3:O3),C3,C3*20,C3*10,0,0,0,0,0,0,0,0))/CHOOSE(11-COUNTBLANK(F3:O3),1,30,30,30,40,50,60,70,80,90,100 ))

(There can be up to 28 options in CHOOSE function)


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"Inspector" wrote in message
...
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,""))))))






  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Inspector
 
Posts: n/a
Default IF function

Now, the next step, if I extend that to 15 cells (F2:T2), will that formula
work also? Of course I'll change 10-COUNTBLANK to 15-COUNTBLANK

"Toppers" wrote:

what i wanted to know was:

IF(10-COUNTBLANK(F3:O3)=7,TRUNC(SUM(F3:O3)/70?
IF(10-COUNTBLANK(F3:O3)=8,TRUNC(SUM(F3:O3)/80?
?
?

"Inspector" wrote:

Each cell in F3:O3 represents a total of 10 games of bowling/day. F3:J3
would be 5 days or 50 games for the month of Nov. K3:O3 would be 5 days
or 50 games in Dec. All these games may or may not be bowled. I'm good for
the first 5 IF's but just need to continue it to 10 IF's, F3:O3.

"Toppers" wrote:

If the formulas for 7 to 10 follow those of 3 to 6 then Duke's solution would
work with a minor modification.

What are those for 7 to 10?

"Inspector" wrote:

I actually have to continue up to IF 10-COUNTBLANK =10

"Duke Carey" wrote:

maybe

=IF(AND(COUNTBLANK(F3:O3)3,COUNTBLANK(F3:O3)<8),T RUNC(SUM(F3:O3)/(10*(10-COUNTBLANK(F3:O3)))),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),""))))


"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,""))))))

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
Creating a Custom Excel Function to Calculate Gini Coefficients [email protected] Excel Worksheet Functions 3 February 21st 06 10:15 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Hyperlinks using R[1]C[1] and offset function in its cell referenc Elijah-Dadda Excel Worksheet Functions 0 March 5th 05 03:31 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


All times are GMT +1. The time now is 04:39 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"