ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   IF Function too Large (https://www.excelbanter.com/excel-discussion-misc-queries/71088-if-function-too-large.html)

Trying Hard

IF Function too Large
 
The function below is a partial version of the correct one; I will exceed the
allowed characters for the field (too many arguments). I notice I am using
different arguments which could be combined as a range: IF(C16=5:7 for the
same results, in other words 5, 6 & 7 all = E20 as a result.

=IF(C16=5,E20,IF(C16=6,E20,IF(C16=7,E20,IF(C16=8,E 21,IF(C16=9,E21,IF(C16=10,E22,IF(C16=11,E22,IF(C16 11,E23,0))))))))

How can I build this function combining criteria as a range for a common
result?

--
Thank you,

Trying Hard

daddylonglegs

IF Function too Large
 

This could replace what you have so far, you could build on it instead
of nested IFs

=INDEX(E20:E23,MATCH(C16,{5,8,10,12}))


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=511411


Trying Hard

IF Function too Large
 
This works but I modified it to allow a 0 for numbers below 5:

=INDEX(E19:E23,MATCH(C16,{0,5,7,10,15}))

I am currious though could I also enable this with differant functions?

--
Thank you,

Trying Hard


"daddylonglegs" wrote:


This could replace what you have so far, you could build on it instead
of nested IFs

=INDEX(E20:E23,MATCH(C16,{5,8,10,12}))


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=511411



daddylonglegs

IF Function too Large
 

Trying Hard Wrote:
.....
I am currious though could I also enable this with differant
functions?
.....


Not sure what you mean, you can certainly use that type of setup in
many different circumstances. In general if you're using more than
about 3 nested IFs you'll probably be better off with some sort of
LOOKUP/INDEX/MATCH formula - the exact formula you need will depend on
the exact circumstances


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=511411



All times are GMT +1. The time now is 08:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com