Automatically create a table based on two lists

marklu

New Member
Joined
Jan 28, 2011
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
Hi all,

I wanted to see if there's a quick way to combine List 1 and List 2 below so that a new table can be created with the format shown below. Hope my example below helps. Please let me know if you have any questions.

Thanks in advance!
Mark

List 1List 2
ApplesCenter 1
BananasCenter 2
OrangesCenter 3
LemonsCenter 4
GrapesCenter 5
TotalCenter 6
Center 7
Center 8
Center 9
Center 10
Center 11
Center 12
Center 13
Center 14
Center 15
Center 16
Table
Center 1Apples
Center 1Bananas
Center 1Oranges
Center 1Lemons
Center 1Grapes
Center 1Total
Center 2Apples
Center 2Bananas
Center 2Oranges
Center 2Lemons
Center 2Grapes
Center 2Total
Center 3Apples
Center 3Bananas
Center 3Oranges
Center 3Lemons
Center 3Grapes
Center 3Total
……………………. and on
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi & welcome to MrExcel.

What version of Excel are you using?
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Thanks! I have Windows Excel 2016. I've just updated my user profile to reflect that.
 
Upvote 0
Ok, thanks for that.
How about
+Fluff 1.xlsm
ABCDE
1List 1List 2
2ApplesCenter 1Center 1Apples
3BananasCenter 2Center 1Bananas
4OrangesCenter 3Center 1Oranges
5LemonsCenter 4Center 1Lemons
6GrapesCenter 5Center 1Grapes
7TotalCenter 6Center 1Total
8Center 7Center 2Apples
9Center 8Center 2Bananas
10Center 9Center 2Oranges
11Center 10Center 2Lemons
12Center 11Center 2Grapes
13Center 12Center 2Total
14Center 13Center 3Apples
15Center 14Center 3Bananas
16Center 15Center 3Oranges
17Center 16Center 3Lemons
18Center 3Grapes
19Center 3Total
20Center 4Apples
21Center 4Bananas
22Center 4Oranges
23Center 4Lemons
24Center 4Grapes
25Center 4Total
26Center 5Apples
27
Main
Cell Formulas
RangeFormula
D2:D26D2=INDEX($B$2:$B$17,INT((ROWS(D$2:D2)-1)/ROWS($A$2:$A$7))+1)
E2:E26E2=INDEX($A$2:$A$7,MOD((ROWS(D$2:D2)-1),ROWS($A$2:$A$7))+1)
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,467
Members
448,965
Latest member
grijken

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