Index and Match Multiple Critera

Sisk

New Member
Joined
Jun 3, 2020
Messages
11
Office Version
  1. 365
Hi,

I am trying to compare last months cost ledger with this months. Last month I went through some 7000 line items and assigned them a cost heading manually as the accounts system does not do it for me. I don't want to revisit another 7000 line items in the new ledger rather the new ledger items which have landed in the month.

Unfortunately I don't have any unique transaction ID's so I'm having to run an index / match formula based on an internal transaction reference and a description (2 criteria).

However, I've only got as far as running the formula based on one criteria and would like to extend this to two (or even three) to ensure as many entries are captured and help in minimising coding of old items.

Where Column K (Internal Ref for this month) and Column L (External Ref this month) and Columns X to Z contain the Internal Ref, External Ref and Cost Head to Last Month:

T8= =INDEX(X8:Z7213,MATCH(K8,X8:X7213,0),3)

Can anyone kindly point me in the right direction?

Annotation 2020-06-03 174744.png
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
How about
=INDEX($Z$8:$Z$7213,MATCH(K8&"|"&L8,$X$8:$X$7213&"|"&$Y$8:$Y$7213,0))

Although from the image it looks as though the lookup range is W:Y not X:Z
 
Upvote 0
Hi fluff,

No joy with that. #VALUE I've also tried


=INDEX($W$8:$Y$7212,MATCH(K8&"|"&L8,$W$8:$W$7213&"|"&$X$8:$X$7213,0))


What are the "|" for?
 
Upvote 0
It should be
=INDEX($Y$8:$Y$7212,MATCH(K8&"|"&L8,$W$8:$W$7213&"|"&$X$8:$X$7213,0))
 
Upvote 0
Hi fluff,

Thanks - tried that again but to no avail. Last months data is in columns W:Y (including cost heading) and this months cost ledger is in Columns A:S in Column T I'm trying to allocate a cost head to each line item based on the internal and external ref in Column K and Column L. Hope I've explained that properly.
 
Upvote 0
Can you post some sample data using the XL2BB add-in?
 
Upvote 0
export51765.xml
JKLMNOPQRSTUVWXY
7Tran DateInternal RefExternal RefPO NumberQuantityUnit Actual Costs Accruals Total (STG) Month EndInternal RefExternal RefCost Head
803/04/201800000001Expenses: Jez0 461.00 - 461.00 30/04/2018#VALUE!00000001Expenses: JezStaff
919/06/201800000003Expenses: Michael B0 4,960.00 - 4,960.00 30/06/2018#VALUE!00000003Expenses: Michael BStaff
1026/06/201800000004Expenses: Michael B0 1,742.07 - 1,742.07 30/06/201800000004Expenses: Michael BStaff
1130/06/201824892John Expenses0- 1,742.07 - - 1,742.07 30/06/201824892John ExpensesOverhead
1224/07/201800000012Expenses: Ian J0 530.00 - 530.00 31/07/201800000012Expenses: Ian JMaterials
1308/08/201800000044Expenses: John H0 39.84 - 39.84 31/08/201800000044Expenses: John HPlant
1421/08/201800000014Expenses: Ian J0 530.00 - 530.00 31/08/201800000014Expenses: Ian JSubcontract
1522/08/201800000045Expenses: John Hog0 30.00 - 30.00 31/08/201800000045Expenses: John HogStaff
1622/08/201800000045Expenses: John Hog0 13.43 - 13.43 31/08/201800000045Expenses: John HogStaff
1731/10/201800000050Expenses: John Hog0 106.74 - 106.74 31/10/201800000050Expenses: John HogStaff
1831/10/201800000050Expenses: John Hog0 93.56 - 93.56 31/10/201800000050Expenses: John HogStaff
1931/10/201800000005Expenses: Michael B0 84.00 - 84.00 31/10/201800000005Expenses: Michael BStaff
2031/10/201800000008Expenses: Sandy M0 236.90 - 236.90 31/10/201800000008Expenses: Sandy MStaff
2131/10/201800000003Expenses: Jack A0 112.18 - 112.18 31/10/201800000003Expenses: Jack AStaff
Data
Cell Formulas
RangeFormula
T8T8=INDEX($Y$8:$Y$7212,MATCH(K8&"|"&L8,$W$8:$W$7213&"|"&$X$8:$X$7213,0))
T9T9=INDEX($Y$8:$Y$7212,MATCH(K9&""&L9,$W$8:$W$7213&""&$X$8:$X$7213,0))
S8:S21S8=EOMONTH(J8,0)
 
Upvote 0
Do you have the dynamic array functions like Filter, Sequence?
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,543
Members
449,089
Latest member
davidcom

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