IF statement

Ingolf

Banned
Joined
Mar 20, 2011
Messages
809
Hey

I have this formula: =INDEX(A1:G24;SUMPRODUCT(--(IF(AT2=1;I18:M24=AU2;IF(AT2=2;N18:R24=AU2;IF(AT2=3;S18:W24=AU2;IF(AT2=4;X18:AC24=AU2;IF(AT2=5;AD18:AH24=AU2;IF(AT2=6;AI18:AM24=AU2;IF(AT2=7;I28:N34=AU2;IF(AT2=8;O28:S34=AU2;IF(AT2=9;T28:X34=AU2;IF(AT2=10;Y28:AC34=AU2;IF(AT2=11;AD28:AH34;IF(AT2=12;AI28:AN34)))))))))))))*ROW(A18:G24));MATCH(C15;A17:G17;0)) and I think is to much IF statement, cause any search in this area IF(AT2=11;AD28:AH34;IF(AT2=12;AI28:AN34) has result #ref.
Hoe can I rebuild this formula?
I use excel 2010
Thanks for any help!
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hello,

At a glance I beleive the CHOOSE(AT2,,,,,,) would help here.

Try also replacing all semi colons with comma

Jeff
 
Upvote 0
I see that:

ROW(A4:G18) will always return 4 in this formula

Even ROWS(A4:G18) would constantly be 15. Maybe you know this.

Also close up the AI 18 from

(AT2=6;AI 18:AM24=AU2;

to:

(AT2=6;AI18:AM24=AU2;


Here is an example of CHOOSE()

=CHOOSE(AT2,"Here for AT2=1","Here for AT2=2","Here for AT2=3","Here for AT2=4","Here for AT2=5","Here for AT2=6","Here for AT2=7","Here for AT2=8","Here for AT2=9","Here for AT2=10","Here for AT2=11","Here for AT2=12")

Replace the "Here for..." with you formula needs
 
Upvote 0
I not understend CHOOSE(AT2,"Here for AT2=1","Here for AT2=2",..... my formula is
IF(AT2=1;I18:M24=AU2;IF(AT2=2;N18:R24=AU2....... how can I replace?
 
Upvote 0
No is not real

IF(AT2=1;I18:M24=AU2;IF(AT2=2;N18:R24=AU2;IF(AT2=3;S18:W24=AU2;IF(AT2=4;X18:AC24=AU2;IF(AT2=5;AD18:AH24=AU2;IF(AT2=6;AI18:AM24=AU2;IF(AT2=7;I28:N34=AU2;IF(AT2=8;O28:S34=AU2;IF(AT2=9;T28:X34=AU2;IF(AT2=10;Y28:AC34=AU2;IF(AT2=11;AD28:AH34;IF (AT2=12;AI28:AN34))))))))))))
 
Upvote 0
IF(AT2=1,I18:M24=AU2.....

Are you believing that you can update I18:M24 to the value of AU2 in an IF statement???

Because a formula can't update another cell
 
Upvote 0
what does I18:M24=AU2 Mean?

IF( Logical statement, True value , false value)

what is I18:M24=AU2, which looks like you're attempting to update range I18:M24 with the value from AU2 ?

I haven't seen this before and can not get the most simplified version of it to work
as i IF(A1=1,B1:B3=C2,"") =#VALUE!

did you mean IF( AND(AT2=1, I18:M24=AU2 ), true,false)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,876
Members
452,949
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top