What is missing/wrong with this formula? if+index-match+text-join

valmir

Board Regular
Joined
Feb 10, 2021
Messages
235
Office Version
  1. 365
Platform
  1. Windows
Hi everyone
This formula:
=IF(INDEX(INDIRECT($A24&"!$R$2:$FK$51");50;MATCH(INDIRECT($A24&"!$HV$5");INDIRECT($A24&"!$R$2:$FK$2");0)+2)<0;INDEX(INDIRECT($A24&"!$R$2:$FK$51");50;MATCH(INDIRECT($A24&"!$HV$5");INDIRECT($A24&"!$R$2:$FK$2");0)+2);TEXTJOIN("-";TRUE;INDIRECT($A24&"!$ID$5";INDIRECT($A24&"!$IE$5"))))
is made up of three parts:
Part 1: if index match < 0
IF(INDEX(INDIRECT($A24&"!$R$2:$FK$51");50;MATCH(INDIRECT($A24&"!$HV$5");INDIRECT($A24&"!$R$2:$FK$2");0)+2)<0
Part 2: value if true
index match
Part 3: value if false:
TEXTJOIN("-";TRUE;INDIRECT($A24&"!$ID$5";INDIRECT($A24&"!$IE$5")
Textjoin part is showing only the first value, not the second one.
Thanks!
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
The INDIRECT syntax does not look right in Part 3.
Excel Formula:
INDIRECT($A24&"!$ID$5";INDIRECT($A24&"!$IE$5"))
The second argument to INDIRECT is optional to indicate address style and should be TRUE or FALSE if included. But you have another INDIRECT there that will be a multi-cell range reference. I'm guessing that is your problem. But since I don't know what you want your formula to do I cannot guess at what would be correct.
 
Upvote 0
In part 3, I just want to join ID5 & IE5. How do I do that then?
In this formula:
=IF(INDIRECT($A24&"!$IH$5")<0;INDIRECT($A24&"!$IH$5");TEXTJOIN("-";TRUE;INDIRECT($A24&"!$ID$5");INDIRECT($A24&"!$IE$5")))
It works perfectly!
For this case, I have this in "$A24&"!$IH$5":
=IFERROR(INDEX($R$51:$FK$51;MATCH(HV5;$R$2:$FK$2;0)+2);"")
 
Upvote 0
I don't have much of an idea how I got this but this is the solution:
=IF(INDEX(INDIRECT($A24&"!$R$51:$FK$51");MATCH(1;INDIRECT($A24&"!$R$2:$FK$2");0)+2)<0;INDEX(INDIRECT($A24&"!$R$51:$FK$51");MATCH(1;INDIRECT($A24&"!$R$2:$FK$2");0)+2);TEXTJOIN("-";TRUE;INDIRECT($A24&"!$ID$5");INDIRECT($A24&"!$IE$5")))
 
Upvote 0
I don't have much of an idea how I got this but this is the solution:
=IF(INDEX(INDIRECT($A24&"!$R$51:$FK$51");MATCH(1;INDIRECT($A24&"!$R$2:$FK$2");0)+2)<0;INDEX(INDIRECT($A24&"!$R$51:$FK$51");MATCH(1;INDIRECT($A24&"!$R$2:$FK$2");0)+2);TEXTJOIN("-";TRUE;INDIRECT($A24&"!$ID$5");INDIRECT($A24&"!$IE$5")))
Still need help: match value is not working...
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

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