Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Multi IF function not working

How do I get this type of formula to work without it giving me a "Too many
arguments for this function" error:

=IF(B21=14,B3/2,0,IF(B21=15,C3/2,0,IF(B21=16,D3/2,0,IF(B21=17,E3/2,0,IF(B21=18,F3/2,0,IF(B21=19,G3/2,0,IF(B21=20,H3/2,0)))))))

Is there another Function I can use?
--
IT1 Navy
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default Multi IF function not working

Each of your IFs has one argument too many.
Try leaving out the ,0

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"IT1Navy" wrote in message
...
How do I get this type of formula to work without it giving me a "Too many
arguments for this function" error:

=IF(B21=14,B3/2,0,IF(B21=15,C3/2,0,IF(B21=16,D3/2,0,IF(B21=17,E3/2,0,IF(B21=18,F3/2,0,IF(B21=19,G3/2,0,IF(B21=20,H3/2,0)))))))

Is there another Function I can use?
--
IT1 Navy


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Multi IF function not working

There are two ways to fix your formula (specifically):

=IF(B21=14,B3/2,0)+IF(B21=15,C3/2,0)+IF(B21=16,D3/2,0)+IF
(B21=17,E3/2,0)+IF(B21*=18,F3/2,0)+IF(B21=19,G3/2,0)+IF(B21=20,H3/2,0)

or:

=IF(B21=14,B3/2,IF(B21=15,C3/2,IF(B21=16,D3/2,IF(B21=17,E3/2,IF(B21*
=18,F3/2,IF(B21=19,G3/2,IF(B21=20,H3/2,0)))))))

However, there are other ways of going about it - here's one way with
some error checking:

=IF(OR(B21<14,B2120),"",INDEX(B3:H3,B21-13)/2)

Hope this helps.

Pete

On Feb 2, 6:52*pm, IT1Navy wrote:
How do I get this type of formula to work without it giving me a "Too many
arguments for this function" error:

=IF(B21=14,B3/2,0,IF(B21=15,C3/2,0,IF(B21=16,D3/2,0,IF(B21=17,E3/2,0,IF(B21*=18,F3/2,0,IF(B21=19,G3/2,0,IF(B21=20,H3/2,0)))))))

Is there another Function I can use?
--
IT1 Navy


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Multi IF function not working

This should read
=IF(B21=14,B3/2,IF(B21=15,C3/2,IF(B21=16,D3/2,IF(B21=17,E3/2,IF(B21=18,F3/2,IF(B21=19,G3/2,IF(B21=20,H3/2,0)))))))
Note I have removed all the " ,0 " except the last
This works: it has only 7 nested IFs

Why not do the division only once
=IF(B21=14,B3,IF(B21=15,C3,IF(B21=16,D3,IF(B21=17, E3,IF(B21=18,F3,IF(B21=19,G3,IF(B21=20,H3,0)))))))/2

This is shorted and, unlike the others, can be extended since there is no
nesting
=IF(OR(B21<14,B2120),0,INDIRECT(CHAR(B21+52)&"3")/2)

This does away with IF
=AND(B2113,B21<21)*INDIRECT(CHAR(B21+52)&"3")/2

best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"IT1Navy" wrote in message
...
How do I get this type of formula to work without it giving me a "Too many
arguments for this function" error:

=IF(B21=14,B3/2,0,IF(B21=15,C3/2,0,IF(B21=16,D3/2,0,IF(B21=17,E3/2,0,IF(B21=18,F3/2,0,IF(B21=19,G3/2,0,IF(B21=20,H3/2,0)))))))

Is there another Function I can use?
--
IT1 Navy



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
Which function/s should be used on a multi conditional formula? Chuck Excel Discussion (Misc queries) 4 January 6th 09 10:19 PM
Multi Function for Unique Numbers Amber Excel Worksheet Functions 4 May 15th 07 09:56 PM
multi function cells kellerfro Excel Discussion (Misc queries) 4 June 27th 05 07:34 PM
Multi-If function Stefano Excel Worksheet Functions 1 April 2nd 05 11:49 AM
How do I create a multi formula IF function in Excel? Wazza Excel Worksheet Functions 8 November 8th 04 09:25 PM


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