I need help nesting this "IF" formula

valmir

Active Member
Joined
Feb 10, 2021
Messages
267
Office Version
  1. 365
Platform
  1. Windows
Hello everyone:
Please help me nest this "IF" formula as follows:
IF
LOGICAL TEST
Excel Formula:
INDEX(INDIRECT($A24&"!$R$51"):INDIRECT($A24&"!$DO$51"),1,MATCH(INDIRECT($A24&"!$HI$8"),INDIRECT($A24&"!$R$2"):INDIRECT($A24&"!$DO$2"),0)+2)<0
VALUE IF TRUE
Excel Formula:
INDEX(INDIRECT($A24&"!$R$51"):INDIRECT($A24&"!$DO$51"),1,MATCH(INDIRECT($A24&"!$HI$8"),INDIRECT($A24&"!$R$2"):INDIRECT($A24&"!$DO$2"),0)+2)
VALUE IF FALSE
Excel Formula:
TEXTJOIN("-",TRUE,INDIRECT($A24&"!$HQ$8"),INDIRECT($A24&"!$HR$8"))
Thanks!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Not sure what you mean BY Nest
I have simply appled to an IF( TEST, TRUE, FALSE)
what are you getting ????? that means you need a NEST


= IF ( INDEX(INDIRECT($A24&"!$R$51"):INDIRECT($A24&"!$DO$51"),1,MATCH(INDIRECT($A24&"!$HI$8"),INDIRECT($A24&"!$R$2"):INDIRECT($A24&"!$DO$2"),0)+2)<0 , INDEX(INDIRECT($A24&"!$R$51"):INDIRECT($A24&"!$DO$51"),1,MATCH(INDIRECT($A24&"!$HI$8"),INDIRECT($A24&"!$R$2"):INDIRECT($A24&"!$DO$2"),0)+2),TEXTJOIN("-",TRUE,INDIRECT($A24&"!$HQ$8"),INDIRECT($A24&"!$HR$8")))

I'm assuming each of the formulas works when on there OWN , i have not checked the formulas at all - just applied to an IF()

May need and iferror to allow for the index NOT to find anything

=IFERROR (IF ( INDEX(INDIRECT($A24&"!$R$51"):INDIRECT($A24&"!$DO$51"),1,MATCH(INDIRECT($A24&"!$HI$8"),INDIRECT($A24&"!$R$2"):INDIRECT($A24&"!$DO$2"),0)+2)<0 , INDEX(INDIRECT($A24&"!$R$51"):INDIRECT($A24&"!$DO$51"),1,MATCH(INDIRECT($A24&"!$HI$8"),INDIRECT($A24&"!$R$2"):INDIRECT($A24&"!$DO$2"),0)+2),TEXTJOIN("-",TRUE,INDIRECT($A24&"!$HQ$8"),INDIRECT($A24&"!$HR$8"))) , "")
 
Upvote 0
Solution
Not sure what you mean BY Nest
I have simply appled to an IF( TEST, TRUE, FALSE)
what are you getting ????? that means you need a NEST


= IF ( INDEX(INDIRECT($A24&"!$R$51"):INDIRECT($A24&"!$DO$51"),1,MATCH(INDIRECT($A24&"!$HI$8"),INDIRECT($A24&"!$R$2"):INDIRECT($A24&"!$DO$2"),0)+2)<0 , INDEX(INDIRECT($A24&"!$R$51"):INDIRECT($A24&"!$DO$51"),1,MATCH(INDIRECT($A24&"!$HI$8"),INDIRECT($A24&"!$R$2"):INDIRECT($A24&"!$DO$2"),0)+2),TEXTJOIN("-",TRUE,INDIRECT($A24&"!$HQ$8"),INDIRECT($A24&"!$HR$8")))

I'm assuming each of the formulas works when on there OWN , i have not checked the formulas at all - just applied to an IF()

May need and iferror to allow for the index NOT to find anything

=IFERROR (IF ( INDEX(INDIRECT($A24&"!$R$51"):INDIRECT($A24&"!$DO$51"),1,MATCH(INDIRECT($A24&"!$HI$8"),INDIRECT($A24&"!$R$2"):INDIRECT($A24&"!$DO$2"),0)+2)<0 , INDEX(INDIRECT($A24&"!$R$51"):INDIRECT($A24&"!$DO$51"),1,MATCH(INDIRECT($A24&"!$HI$8"),INDIRECT($A24&"!$R$2"):INDIRECT($A24&"!$DO$2"),0)+2),TEXTJOIN("-",TRUE,INDIRECT($A24&"!$HQ$8"),INDIRECT($A24&"!$HR$8"))) , "")
Perfect! You saved my day! Thank you so much! :) 👏 👏 👏
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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