INDEX/MATCH 2D Array.

Jabberwokki

New Member
Joined
Dec 2, 2020
Messages
33
Office Version
  1. 2010
Platform
  1. Windows
Hi There

I have a sheet with columns A through H in use. Row 1 is for headings.

Column A contains uniques I.D's. Columns B through G (Array) contain unique values and some empty cells. Column H uses the TOCOL function to list the values contained in the array vertically removing blanks.
I'd like column I to look up the values in column H and return the unique ID in column A.

I've used INDEX_MATCH and can return the ID from individual columns in the array but not the whole array at the same time.

Happy to upload the sheet for reference.

Any assistance greatly appreciated.

Regards

Dominic
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
How about
Excel Formula:
=HSTACK(TOCOL(B2:G22,1),TOCOL(IF(B2:G22<>"",A2:A22,1/0),2))
 
Upvote 0
How about
Excel Formula:
=HSTACK(TOCOL(B2:G22,1),TOCOL(IF(B2:G22<>"",A2:A22,1/0),2))
Hi Fluff and thank you for your response.

Your formula doesn't seem to omit any blanks or zeros from the array. The formula i'm using for column H is
Excel Formula:
=FILTER(TOCOL(B2:G21,3,FALSE),(TOCOL(B2:G21,3,FALSE)<>""))

Is there anyway your formula could omit blanks and zeros from the array?
 
Upvote 0
Hi Fluff

After some fiddling about I've managed to sort the ID column 'I' using part of your formula although i'm struggling to wrap my head round how it works! I've retained my:
Excel Formula:
=FILTER(TOCOL(B2:G21,3,FALSE),(TOCOL(B2:G21,3,FALSE)<>""))
Function to list values in the Array vertically removing blanks and zeros in column 'H' and then used:
Excel Formula:
TOCOL(IF(B2:G22<>"",A2:A22,1/0),2)
in column 'I' to search the Array and provide the ID....

As i said, not sure how it does it..It's the wrapped IF statement in TOCOL that's confusing me!

Anyways, very much appreciate your help. Thank you.

Regards

Dominic
 
Upvote 0
Your formula doesn't seem to omit any blanks or zeros from the array.
It won't omit zeros, but it will omit blanks as long as the cells are empty, rather than have a formula that returns ""
How about
Excel Formula:
=HSTACK(TOCOL(IF(B2:G22<>"",B2:G22,1/0),3),TOCOL(IF(B2:G22<>"",A2:A22,1/0),2))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 1

Forum statistics

Threads
1,215,129
Messages
6,123,214
Members
449,091
Latest member
jeremy_bp001

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