Dynamic Lookup Tables

Pestomania

Active Member
Joined
May 30, 2018
Messages
292
Office Version
  1. 365
Platform
  1. Windows
I cannot upload the excel sheet like I was hoping to be able to, but I will add screenshots of what I am working with.

I am hoping to create dynamic formulas that update automatically based on table changes.

Please see and let me know if there are questions.

Picture 1 is the table that I need to change:

1676637209036.png


Picture 2 is the table providing the "cycle time" for each product to use the individual machine.
1676637305425.png

Picture 3 is the product demand per month:
1676637329314.png


Essentially I want the system to look at picture 3, multiply by picture 2, and populate picture 1
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Maybe something like this:

Book1
ABCDEFGHIJKLMN
12023
2Machine Name2023 TotalJan-2023Feb-2023Mar-2023
3Machine 16250500500500
4Machine 218000016001600161600
5
6
7
8Program NameMachine 1Machine 2Machine 3
9Product 125801000
10Product 216000
11
12
13
14
152023
16Product Name2023 TotalJan-2023Feb-2023Mar-2023
17Product 1250202020
18Product 2100010
19
Sheet1
Cell Formulas
RangeFormula
B3:E4B3=SUMPRODUCT(INDEX($B$9:$F$13,0,MATCH($A3,$B$8:$F$8,0)),INDEX($B$17:$G$21,0,MATCH(B$2,$B$16:$G$16,0)))


This assumes that the product order in the 2 secondary tables is the same. You can let the table ranges in the formula extend beyond what is currently needed, so if you add more products or dates later, the formula will automatically include them.
 
Upvote 0
Solution
Maybe something like this:

Book1
ABCDEFGHIJKLMN
12023
2Machine Name2023 TotalJan-2023Feb-2023Mar-2023
3Machine 16250500500500
4Machine 218000016001600161600
5
6
7
8Program NameMachine 1Machine 2Machine 3
9Product 125801000
10Product 216000
11
12
13
14
152023
16Product Name2023 TotalJan-2023Feb-2023Mar-2023
17Product 1250202020
18Product 2100010
19
Sheet1
Cell Formulas
RangeFormula
B3:E4B3=SUMPRODUCT(INDEX($B$9:$F$13,0,MATCH($A3,$B$8:$F$8,0)),INDEX($B$17:$G$21,0,MATCH(B$2,$B$16:$G$16,0)))


This assumes that the product order in the 2 secondary tables is the same. You can let the table ranges in the formula extend beyond what is currently needed, so if you add more products or dates later, the formula will automatically include them.
This worked swimmingly, but when I added another column to the table, it didn't change the "Headers" part of the formula. Here is what it looks like now.

Excel Formula:
=SUMPRODUCT(INDEX(Table19[[Machine 1]:[Machine 3]],0,MATCH($A3,Table19[[#Headers],[Machine 1]:[Machine 3]],0)),INDEX('Monthly Breakdown Table'!$B$3:$DA$4,0,MATCH(B$2,'Monthly Breakdown Table'!$B$2:$DA$2,0)))

I need the Table19[[#Headers],[Machine 1]:[Machine 3]] to go to Table19[[#Headers],[Machine 1]:[Machine 4]]
 
Upvote 0
Just change [Machine 1]:[Machine 3] to [#Data] like this:

Book1
ABCDEFGHIJKLMN
12023
2Machine Name2023 TotalJan-2023Feb-2023Mar-2023
3Machine 16250500500500
4Machine 218000016001600161600
5
6
7
8Program NameMachine 1Machine 2Machine 3
9Product 125801000
10Product 216000
11
12
13
14
152023
16Product Name2023 TotalJan-2023Feb-2023Mar-2023
17Product 1250202020
18Product 2100010
Sheet1
Cell Formulas
RangeFormula
B3:E4B3=SUMPRODUCT(INDEX(Table19[#Data],0,MATCH($A3,Table19[#Headers],0)),INDEX($B$17:$G$18,0,MATCH(B$2,$B$16:$G$16,0)))


The biggest issue is that the 2 secondary tables have to have the same number of rows. If they are not actual Excel tables, you can extend the range beyond the end. But if you use the table nomenclature, you can't do that. So if you add a new product, you have to change the formula. Unless you make table 3 into a table too, then you can use the same trick.
 
Upvote 0

Forum statistics

Threads
1,214,790
Messages
6,121,608
Members
449,038
Latest member
apwr

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