Help with lookup

Cpanc

New Member
Joined
Dec 6, 2024
Messages
7
Office Version
  1. 365
I am unable to find a solution to this issue. We have a file where we have multiple header columns and it is dynamic in a sense. Every month we can have new rows and new columns to the dataset. As seen in example photo below I am trying to lookup number for specific cell by row column headers.
Thank you all!
 

Attachments

  • image0.jpeg
    image0.jpeg
    120.2 KB · Views: 14
I have another follow up question though. Some of headers in the file are merged. For example AB Fee is merged from B to E.
Could we have a small set of dummy sample data in the new layout with XL2BB and explain again in relation to that sample data?
(If you have trouble with XL2BB, review the "XL2BB Icons greyed out" link in the 'Known XL2BB issues' section near the top of the XL2BB Instructions page linked above.)
 
Upvote 0

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Could we have a small set of dummy sample data in the new layout with XL2BB and explain again in relation to that sample data?
.. unless this is what you mean/want?

Cpanc.xlsm
ABCDEFGHIJKL
1
2AB FEECD FEE
3Level 1Level 1Level 2Level 2Level 1Level 1Level 2Level 2
4Class AClass BClass AClass BClass CClass DClass CClass D
531/01/2024110203040506070AB FeeCD Fee
629/02/2024211213141516171Level 2Level 1
731/03/2024312223242526272Class AClass D
830/04/202441323334353637331/03/202431/07/2024
931/05/20245142434445464742256
1030/06/2024615253545556575
1131/07/2024716263646566676
1231/08/2024817273747576777
1330/09/2024918283848586878
1431/10/20241019293949596979
1530/11/20241120304050607080
1631/12/20241221314151617181
Sheet1
Cell Formulas
RangeFormula
K9:L9K9=INDEX($B$5:$I$16,MATCH(K8,$A$5:$A$16,0),MATCH(TEXTJOIN("|",,K5:K7),MAKEARRAY(1,8,LAMBDA(r,c,TEXTJOIN("|",,LOOKUP("zz",B2:INDEX($B$2:$I$2,c)),INDEX($B$3:$I$4,0,c)))),0))
 
Upvote 0
.. unless this is what you mean/want?

Cpanc.xlsm
ABCDEFGHIJKL
1
2AB FEECD FEE
3Level 1Level 1Level 2Level 2Level 1Level 1Level 2Level 2
4Class AClass BClass AClass BClass CClass DClass CClass D
531/01/2024110203040506070AB FeeCD Fee
629/02/2024211213141516171Level 2Level 1
731/03/2024312223242526272Class AClass D
830/04/202441323334353637331/03/202431/07/2024
931/05/20245142434445464742256
1030/06/2024615253545556575
1131/07/2024716263646566676
1231/08/2024817273747576777
1330/09/2024918283848586878
1431/10/20241019293949596979
1530/11/20241120304050607080
1631/12/20241221314151617181
Sheet1
Cell Formulas
RangeFormula
K9:L9K9=INDEX($B$5:$I$16,MATCH(K8,$A$5:$A$16,0),MATCH(TEXTJOIN("|",,K5:K7),MAKEARRAY(1,8,LAMBDA(r,c,TEXTJOIN("|",,LOOKUP("zz",B2:INDEX($B$2:$I$2,c)),INDEX($B$3:$I$4,0,c)))),0))

Yea that is what I meant exactly. Will try the solution today. Thanks a ton
 
Upvote 0
Yea that is what I meant exactly. Will try the solution today. Thanks a ton
The textjoin here has to be defined cell specific? Because data bas inconsistent merged cells. Some are merged for 10 columns while some are 5. Apologies should have given proper data set. Will try to provide one today. Thank you
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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