Match data

howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,506
Office Version
  1. 2021
Platform
  1. Windows
I have a heading called asset type in column A and beneath this I have the various asset types for eg Corporate signage, Furniture and Fittings etc, In col H I have a heading called Departments and below this the varios departments for eg Administration, Parts etc and in Column P I have a heading Profit Code. These are all on sheet 1

On sheet 3, I have the Asset Type Dept Code Split

Under asset type I will have for eg Corporate signage
under Dept , I will have for Eg Administration
under code I will have for eg 191475
Under Split i will have for eg 100

I need a code in column P on sheeet 1 that where the asset type and department on sheet 1 and 3 match, that the code and
for Eg Sheet 1 where the asset type is say Corporate signage and the department is Administration and it matches the asset type & department on sheet 3, the under profit code in Col P , the following must appear 191475= 100

See eaxmple of what sheet 3 looks like


Your assistance in this regard will be most appreciated

Excel Workbook
ABCD
1Asset TypeDeptDep CodeSplit
2Corporate SignageAdministration197295100
3Corporate SignageNew Vehicles198123100
4Furniture and FittingsUsed vehicles195125100
Dep Expenses Codes
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Will there always only be one or zero matches or can there be multiple matches? Is there any scope to concatenate your raw data in say a hidden column?

Heres one not so elaborate formula that will work if there is only 1 match, however if theres multiple it will return incorrect data:

=SUMPRODUCT(--(Sheet3!A2:A100=Sheet1!A2),--(Sheet3!B2:B100=Sheet1!H2),Sheet3!C2:C100)&"="&SUMPRODUCT(--(Sheet3!A2:A100=Sheet1!A2),--(Sheet3!B2:B100=Sheet1!H2),Sheet3!D2:D100)
 
Upvote 0
Thanks for the help. The formula for items in A2 and H2 on sheet 1 P2 returns 0= 0 it should return 197295 = 100

See sample data for sheet 1 Col A & H

Your assistance in resolving this will be most appreciated


Excel Workbook
AH
1Asset TypeDepartment
2Corporate SignageADMINISTRATION
3Corporate SignageADMINISTRATION
4Corporate SignageADMINISTRATION
5Corporate SignageADMINISTRATION
6Furniture and FittingsADMINISTRATION
7Furniture and FittingsADMINISTRATION
8Furniture and FittingsADMINISTRATION
9Furniture and FittingsADMINISTRATION
10Furniture and FittingsADMINISTRATION
11Furniture and FittingsADMINISTRATION
12Furniture and FittingsADMINISTRATION
13Furniture and FittingsADMINISTRATION
14Furniture and FittingsADMINISTRATION
Sheet1
 
Upvote 0
Hi Howard,

It works for me. Maybe make sure you don't have any extra spaces in your data?

p.s. if you have more than 100 records in sheet3 make sure you adjust the formula accordingly. :)
 
Upvote 0
Hi Dodger7

I found where my problem was. I had changed the sheet names. It now works perfectly except for asset code Plant & Machinery

See examples below

Sheet1 now names Fassets and sheet3 now names codes

It would be appreciated if you would check & advise. If necessary send me your email address via PM & I will attached my workbook

Excel Workbook
AH
378Plant & MachineryService
379Plant & MachineryService
380Plant & MachineryService
381Plant & MachineryService
FASSETS




Excel Workbook
ABCD
1Asset TypeDeptDep CodeSplit
2Corporate SignageAdministration197295100
3Furniture and FittingsNew Vehicles137300100
4Furniture and FittingsUsed vehicles157300100
5Furniture and FittingsService167300100
6Furniture and FittingsParts177300100
7Furniture and FittingsAdministration197300100
8GeneratorAdministration197305100
9Office EquipmentAdministration197310100
10Office EquipmentNew Vehicles137310100
11Office EquipmentUsed vehicles157310100
12Office EquipmentService167310100
13Office EquipmentParts177310100
14Plant & MachineryService167315100
Codes
 
Upvote 0
Hi Dodger7

I found where my problem was. I had changed the sheet names. It now works perfectly except for asset code Plant & Machinery

See examples below

Sheet1 now names Fassets and sheet3 now names codes

It would be appreciated if you would check & advise. If necessary send me your email address via PM & I will attached my workbook

Excel Workbook
AH
378Plant & MachineryService
379Plant & MachineryService
380Plant & MachineryService
381Plant & MachineryService
FASSETS




Excel Workbook
ABCD
1Asset TypeDeptDep CodeSplit
2Corporate SignageAdministration197295100
3Furniture and FittingsNew Vehicles137300100
4Furniture and FittingsUsed vehicles157300100
5Furniture and FittingsService167300100
6Furniture and FittingsParts177300100
7Furniture and FittingsAdministration197300100
8GeneratorAdministration197305100
9Office EquipmentAdministration197310100
10Office EquipmentNew Vehicles137310100
11Office EquipmentUsed vehicles157310100
12Office EquipmentService167310100
13Office EquipmentParts177310100
14Plant & MachineryService167315100
Codes
 
Last edited:
Upvote 0
Hi Jamie

Problem resolved, Excel playing up. I closed the workbook & re-opened and the formula gave me the correct answer

Have a great day

Regards

Howard
 
Upvote 0

Forum statistics

Threads
1,203,051
Messages
6,053,220
Members
444,648
Latest member
sinkuan85

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