=IF(D57=2,H4,IF(D57=3,H5,IF(D57=4,H6,IF(D57=5,H7,IF(D57=6,H8,IF(D

  • Thread starter Thread starter Riaz Malik
  • Start date Start date
R

Riaz Malik

I want to put =IF(D57=2,H4 to D57=17,H19 arguments in this function.while we
can put only upto 6 or 7 arguments in this formula.

Pease help how can I put as much arguments in same formula or funtion as
much I want.

Thanks,

Riaz Malik
 
For your example, you could make it much simpler by using:

=INDIRECT("H"&D57+2)

Another option would be to concatenate your IF functions instead of nesting
them.

=IF(D57=2,H4,"")&IF(D57=3,H5,"")&IF(D57=4,H6,"") etc...

HTH
Elkar
 
I want to put =IF(D57=2,H4 to D57=17,H19 arguments in this function.while we
can put only upto 6 or 7 arguments in this formula.

Three ways:

a) =CHOOSE(D57,h3,h4,h5,.....)

b) =vlookup(D57, A100:B119,2,false) where A100:A119 contain the values
allowed for D57 and B100:B199 contain the values you want, or references to
H4, etc

c) If you really mean that H4:H19 is the range that corresponds to the whole
number values 2 to 17, and to be safe you should allow for D57=1 (I guess
H3?) then you could simply use
=INDEX(H3:H19,D57)
 
Back
Top