Excel Jason
New Member
- Joined
- Oct 17, 2022
- Messages
- 28
- Office Version
- 365
- Platform
- Windows
I have a formula-driven table that generates all unique combinations from five columns (Core Output Table), which works correctly. However, I need to include custom combinations and integrate their outputs into the same table, regardless of their position. Attempts to adjust the formulas or use helper columns have not achieved this. See the attached image for reference.
Values in the "Custom Inputs Table" must generate all possible combinations alongside the other values in the Core Inputs table. Custom combinations should calculate row-wise using adjacent cells only. For instance, if Custom Input Location Code is US-001 and Person Eating is Brittany, the output includes only this pairing, excluding other custom rows (H5:I5 in this example) (e.g., US-002 and Frank). Combinations should be derived using data from the remaining 3 Core Inputs Table columns (Location Name, Desired Meal, and Contact Type).
Current Formulas in K4:O4 (Dragged Down) for the Core Outputs Table I'm looking to adjust to capture the above.
K4
=IF(ROW()-3<=COUNTA(B$4:B$16)*COUNTA(C$4:C$16)*COUNTA(D$4:D$16)*COUNTA(E$4:E$16)*COUNTA(F$4:F$16),
INDEX(B$4:B$16, MOD(INT((ROW()-4)/(COUNTA(C$4:C$16)*COUNTA(D$4:D$16)*COUNTA(E$4:E$16)*COUNTA(F$4:F$16))), COUNTA(B$4:B$16)) + 1),
"")
L4
=IF(ROW()-3<=COUNTA(B$4:B$16)*COUNTA(C$4:C$16)*COUNTA(D$4:D$16)*COUNTA(E$4:E$16)*COUNTA(F$4:F$16),
INDEX(C$4:C$16, MOD(INT((ROW()-4)/(COUNTA(D$4:D$16)*COUNTA(E$4:E$16)*COUNTA(F$4:F$16))), COUNTA(C$4:C$16)) + 1),
"")
M4
=IF(ROW()-3<=COUNTA(B$4:B$16)*COUNTA(C$4:C$16)*COUNTA(D$4:D$16)*COUNTA(E$4:E$16)*COUNTA(F$4:F$16),
INDEX(D$4:D$16, MOD(INT((ROW()-4)/(COUNTA(E$4:E$16)*COUNTA(F$4:F$16))), COUNTA(D$4:D$16)) + 1),
"")
N4
=IF(ROW()-3<=COUNTA(B$4:B$16)*COUNTA(C$4:C$16)*COUNTA(D$4:D$16)*COUNTA(E$4:E$16)*COUNTA(F$4:F$16),
INDEX(E$4:E$16, MOD(INT((ROW()-4)/COUNTA(F$4:F$16)), COUNTA(E$4:E$16)) + 1),
"")
O4
=IF(ROW()-3<=COUNTA(B$4:B$16)*COUNTA(C$4:C$16)*COUNTA(D$4:D$16)*COUNTA(E$4:E$16)*COUNTA(F$4:F$16),
INDEX(F$4:F$16, MOD(ROW()-4, COUNTA(F$4:F$16)) + 1),
"")
Values in the "Custom Inputs Table" must generate all possible combinations alongside the other values in the Core Inputs table. Custom combinations should calculate row-wise using adjacent cells only. For instance, if Custom Input Location Code is US-001 and Person Eating is Brittany, the output includes only this pairing, excluding other custom rows (H5:I5 in this example) (e.g., US-002 and Frank). Combinations should be derived using data from the remaining 3 Core Inputs Table columns (Location Name, Desired Meal, and Contact Type).
Current Formulas in K4:O4 (Dragged Down) for the Core Outputs Table I'm looking to adjust to capture the above.
K4
=IF(ROW()-3<=COUNTA(B$4:B$16)*COUNTA(C$4:C$16)*COUNTA(D$4:D$16)*COUNTA(E$4:E$16)*COUNTA(F$4:F$16),
INDEX(B$4:B$16, MOD(INT((ROW()-4)/(COUNTA(C$4:C$16)*COUNTA(D$4:D$16)*COUNTA(E$4:E$16)*COUNTA(F$4:F$16))), COUNTA(B$4:B$16)) + 1),
"")
L4
=IF(ROW()-3<=COUNTA(B$4:B$16)*COUNTA(C$4:C$16)*COUNTA(D$4:D$16)*COUNTA(E$4:E$16)*COUNTA(F$4:F$16),
INDEX(C$4:C$16, MOD(INT((ROW()-4)/(COUNTA(D$4:D$16)*COUNTA(E$4:E$16)*COUNTA(F$4:F$16))), COUNTA(C$4:C$16)) + 1),
"")
M4
=IF(ROW()-3<=COUNTA(B$4:B$16)*COUNTA(C$4:C$16)*COUNTA(D$4:D$16)*COUNTA(E$4:E$16)*COUNTA(F$4:F$16),
INDEX(D$4:D$16, MOD(INT((ROW()-4)/(COUNTA(E$4:E$16)*COUNTA(F$4:F$16))), COUNTA(D$4:D$16)) + 1),
"")
N4
=IF(ROW()-3<=COUNTA(B$4:B$16)*COUNTA(C$4:C$16)*COUNTA(D$4:D$16)*COUNTA(E$4:E$16)*COUNTA(F$4:F$16),
INDEX(E$4:E$16, MOD(INT((ROW()-4)/COUNTA(F$4:F$16)), COUNTA(E$4:E$16)) + 1),
"")
O4
=IF(ROW()-3<=COUNTA(B$4:B$16)*COUNTA(C$4:C$16)*COUNTA(D$4:D$16)*COUNTA(E$4:E$16)*COUNTA(F$4:F$16),
INDEX(F$4:F$16, MOD(ROW()-4, COUNTA(F$4:F$16)) + 1),
"")