Combining data from two tables

ginotx

New Member
Joined
Dec 13, 2023
Messages
21
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I am trying to combine information from Sales History and from Current Availability in order to have printouts available for monthly purchase or production scheduling.

I combined the two tables in colums "A" to "I" --(Code to Sales #2022)
800 plus codes with Availability info and 400 plus codes with sales info.
Many codes are not duplicated because the plants are used in production to grow to the larger sizes but not sold resuling in about 400 code duplicates.
I need to combine the tables so that I have Sales history along with availabiliity for each unique plant code.
I used the unique command in order to have only one code in Colums "K" to "S". The problem is combining the "Availability" and "Sales" numbers.

My problem is that I am unable to combine the numbers in colums "N" to "S" (Ready for Sale to Sales $2020)
I have tried XLookup, and Indexmatch, I am not having any luck getting a correct formula.
I did not try sumif becasue there was no calculations needed, just looking up and transferring the info.
XLookup seems to have issues with the duplicate codes so I tried IndexMatch. I must be overthinking something and making this more difficult than it is.

On the spreadsheet example:

Code 52244067 Picea Abies... is one of the duplicate codes with some data on each listing. There is no math calculations needed, just copying the data from two different lines to a unique code to the right.

Thank you


Sales Analysis Trees.xlsx
ABCDEFGHIJKLMNOPQRST
1CODEPLANTSIZEREADY FOR SALENOT READY FOR SALESales # 2023 Sales $ 2023 Sales # 2022 Sales $ 2022 CODEPLANTSIZEREADY FOR SALENOT READYSALES #2023 SALES $2023 SALES #2022 SALES $2022
252046716Picea Pungens Glauca Fastigiata8/10' B&B0352046716Picea Pungens Glauca Fastigiata8/10' B&B
352210127Pinus mugo var. pumilio# 33152052210127Pinus mugo var. pumilio# 3
452210128Pinus mugo var. pumilio# 18002384052210128Pinus mugo var. pumilio# 1
552210129Pinus mugo var. pumilio# 5060052210129Pinus mugo var. pumilio# 5
652241484Pinus mugo var. pumilioSeedling0160052241484Pinus mugo var. pumilioSeedling
752243391Pinus mugo var. pumilio 15/18"079452243391Pinus mugo var. pumilio 15/18"
852243631Pinus mugo var. pumilio 12/15"0180052243631Pinus mugo var. pumilio 12/15"
952244067Picea abies 'Nidiformis'# 384052244067Picea abies 'Nidiformis'# 3
1052244067Picea abies 'Nidiformis'# 392$ 1,63210$ 17652244081Pinus mugo var. pumilio#10
COMBINED DATA SORT
Cell Formulas
RangeFormula
K2:M1012K2=UNIQUE(A2:C2000)
Dynamic array formulas.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Well, it looks like A9 is numeric and A10 is text.
But still you won't get your data from the A10 with a lookup as it will stop at the first record.
One way to approach it is to do what you said you didn't want, here it is summing array formulas. It can probably be done with a filter or sumifs.

Note, I had to make the headers match. They didn't match with I copied your data, I don't know if they already match in your workbook:

Book1
ABCDEFGHIJKLMNOPQRS
1CODEPLANTSIZEREADY FOR SALENOT READY FOR SALESales # 2023 Sales $ 2023 Sales # 2022 Sales $ 2022 CODEPLANTSIZEREADY FOR SALENOT READY FOR SALESales # 2023 Sales $ 2023 Sales # 2022 Sales $ 2022
252046716Picea Pungens Glauca Fastigiata8/10' B&B0352046716Picea Pungens Glauca Fastigiata8/10' B&B030000
352210127Pinus mugo var. pumilio# 33152052210127Pinus mugo var. pumilio# 3315200000
452210128Pinus mugo var. pumilio# 18002384052210128Pinus mugo var. pumilio# 1800238400000
552210129Pinus mugo var. pumilio# 5060052210129Pinus mugo var. pumilio# 506000000
652241484Pinus mugo var. pumilioSeedling0160052241484Pinus mugo var. pumilioSeedling016000000
752243391Pinus mugo var. pumilio 15/18"079452243391Pinus mugo var. pumilio 15/18"07940000
852243631Pinus mugo var. pumilio 12/15"0180052243631Pinus mugo var. pumilio 12/15"018000000
952244067Picea abies 'Nidiformis'# 384052244067Picea abies 'Nidiformis'# 3840921632.0810176.23
1052244067Picea abies 'Nidiformis'# 3921632.0810176.23000000000
Sheet1
Cell Formulas
RangeFormula
K2:M10K2=UNIQUE(A2:C2000)
N2:S10N2=SUM(($D$2:$I$10)*($A$2:$A$10=$K2)*($D$1:$I$1=N$1))
Dynamic array formulas.
 
Upvote 0
I am trying to combine information from Sales History and from Current Availability in order to have printouts available for monthly purchase or production scheduling.

I combined the two tables in colums "A" to "I" --(Code to Sales #2022)
800 plus codes with Availability info and 400 plus codes with sales info.
Many codes are not duplicated because the plants are used in production to grow to the larger sizes but not sold resuling in about 400 code duplicates.
I need to combine the tables so that I have Sales history along with availabiliity for each unique plant code.
I used the unique command in order to have only one code in Colums "K" to "S". The problem is combining the "Availability" and "Sales" numbers.

My problem is that I am unable to combine the numbers in colums "N" to "S" (Ready for Sale to Sales $2020)
I have tried XLookup, and Indexmatch, I am not having any luck getting a correct formula.
I did not try sumif becasue there was no calculations needed, just looking up and transferring the info.
XLookup seems to have issues with the duplicate codes so I tried IndexMatch. I must be overthinking something and making this more difficult than it is.

On the spreadsheet example:

Code 52244067 Picea Abies... is one of the duplicate codes with some data on each listing. There is no math calculations needed, just copying the data from two different lines to a unique code to the right.

Thank you


Sales Analysis Trees.xlsx
ABCDEFGHIJKLMNOPQRST
1CODEPLANTSIZEREADY FOR SALENOT READY FOR SALESales # 2023 Sales $ 2023 Sales # 2022 Sales $ 2022 CODEPLANTSIZEREADY FOR SALENOT READYSALES #2023 SALES $2023 SALES #2022 SALES $2022
252046716Picea Pungens Glauca Fastigiata8/10' B&B0352046716Picea Pungens Glauca Fastigiata8/10' B&B
352210127Pinus mugo var. pumilio# 33152052210127Pinus mugo var. pumilio# 3
452210128Pinus mugo var. pumilio# 18002384052210128Pinus mugo var. pumilio# 1
552210129Pinus mugo var. pumilio# 5060052210129Pinus mugo var. pumilio# 5
652241484Pinus mugo var. pumilioSeedling0160052241484Pinus mugo var. pumilioSeedling
752243391Pinus mugo var. pumilio 15/18"079452243391Pinus mugo var. pumilio 15/18"
852243631Pinus mugo var. pumilio 12/15"0180052243631Pinus mugo var. pumilio 12/15"
952244067Picea abies 'Nidiformis'# 384052244067Picea abies 'Nidiformis'# 3
1052244067Picea abies 'Nidiformis'# 392$ 1,63210$ 17652244081Pinus mugo var. pumilio#10
COMBINED DATA SORT
Cell Formulas
RangeFormula
K2:M1012K2=UNIQUE(A2:C2000)
Dynamic array formulas.

I appreciate your help.

I believe I understand your solution, but I have had a problem applying your solution on my spreadsheet.

When I try to expand the coverage out to 3000 rows in the event I want to include all inventory I recieve "#VALUE!" as a result. Actually, I am unable to get any data past row 9 where the first row of data posts.

Thank you
 
Upvote 0
1. For your first question, what do you mean by "inventory", do you mean the entire range.
2. For your second question, you need to adjust your formula to include the new rows. Your example had ten rows, I created a formula for nine rows (excluding the header).

If the answer to 1 is yes, then without knowing what the other data looks like debugging is difficult. Please post an xl2bb of the rows with the #VALUE error.
For 2, change the $10 in all the references to row # below your last record, like $3000 or something.

Are the datatypes in the comparing columns all the same?
Have you confirmed the VALUES column K are exact matches of a VALUE in column A?
Are columns D-I and N-S all numeric?

Please post the errors, or give the formula in the cell that has the error, and the values on the row. But, would be best to post and xl2bb of that area of the worksheet.
 
Upvote 0
I will have to go back and rework the spreadsheet. The weekend update changed the basic report and I have to pull the data out from a different report. Thank you for your help so far, after I recreate the reports to pull from master data, I will post new copies of the fields I am having issues with.

Thank you for your assistance so far.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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