Combination of data based on loop

GA3

New Member
Joined
Nov 19, 2009
Messages
41
Office Version
  1. 365
  2. 2010
Hello, I have searched the boards for what seems like hours and I can not find anything to help me.

I need to group 3 columns of data. The first 2 columns (group number and store number) must stay paired (they are a required combination) but I need to create the 3rd column to loop through a list of Item numbers and create a 3rd column of code numbers paired with the first 2 columns and then go back to the list of group numbers and store numbers and repeat (loop) the process through the entire list of Group & Store numbers.

Here is an example of what I am needing. The output needs to be in 3 separate columns.

TIA for any help! It is greatly appreciated!

img1.gif
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Are you looking for a formula solution, or a VBA solution? If formula, what version of Excel do you have? Please update your member profile to reflect that. If you have Excel 365 for example, this might work for you:

Book1
ABCDEFGH
1Output
2GroupStoreItem #GroupStoreItem
31000200050000110002000500001
41001200150000210002000500002
51002200250000310002000500003
650000410002000500004
710012001500001
810012001500002
910012001500003
1010012001500004
1110022002500001
1210022002500002
1310022002500003
1410022002500004
15
Sheet21
Cell Formulas
RangeFormula
F3:H14F3=CHOOSE({1,2,3},INDEX($A$3:$A$10,SEQUENCE(COUNTA($A$3:$A$10)*COUNTA($D$3:$D$10),,,1/COUNTA($D$3:$D$10))),INDEX($B$3:$B$10,SEQUENCE(COUNTA($A$3:$A$10)*COUNTA($D$3:$D$10),,,1/COUNTA($D$3:$D$10))),INDEX($D$3:$D$10,MOD(SEQUENCE(COUNTA($A$3:$A$10)*COUNTA($D$3:$D$10),,0),COUNTA($D$3:$D$10))+1))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
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