Make excel worksheet pull data based off of what worksheet i'm in

jondavis1987

Active Member
Joined
Dec 31, 2015
Messages
443
Office Version
  1. 2019
Platform
  1. Windows
I have a worksheet that's a cost of materials worksheet. In the workbook are several different worksheets with different products that use different percentages of different materials. Is there a way to make the cost of materials worksheet update automatically to the information pulled from the worksheet i'm in?

For instance the worksheet with costs is just named "Costs". In "Costs" B20:B30 has a list of all material names. C20:C30 has current percentages of materials. D20:D30 has new percentages we are looking at. In worksheet named "S3pv0261800500" C2:H2 has matierals used in this product. C4:H4 has current percentages. C5:H5 has the new percentages.

But worksheet "S4pv0261600100" only has materials in C2:G2 with percentages in C4:G4 and new percentages in C5:G5.

As it is i would either have to create a cost sheet to go with each product, which would be tedious, or i have to manually type it into the "Costs" sheet. Was wondering if there's a better way?
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi JonDavis1987,

If you select the sheet to use from a dropdown then you can use INDIRECT to populate the Costs sheet.

JonDavis1987.xlsx
BCDEFGH
2Mat 1Mat 2Mat 3Mat 4Mat 9Mat 10
3
4Current % of Materials4.00%2.00%8.00%24.00%0.50%12.00%
5Possible % of Materials4.56%2.28%9.12%27.36%0.57%13.68%
S3pv0261800500


JonDavis1987.xlsx
BCDEFG
2Mat 3Mat 4Mat 5Mat 6Mat 8
3
4Current % of Materials12.00%5.00%12.00%36.00%1.00%
5Possible % of Materials15.00%4.00%2.00%52.00%0.00%
S4pv0261600100


JonDavis1987.xlsx
BCDEF
2Mat 3Mat 4Mat 5Mat 6
3
4Current % of Materials1.00%2.00%3.00%4.00%
5Possible % of Materials2.00%3.00%4.00%5.00%
S onemore123



JonDavis1987.xlsx
BCDEFGHI
19Material NamesCurrent % of MaterialsPossible % of MaterialsSelect SheetSheets
20Mat 1  S4pv0261600100S3pv0261800500
21Mat 2  S4pv0261600100
22Mat 312.00%15.00%S onemore123
23Mat 45.00%4.00%
24Mat 512.00%2.00%
25Mat 636.00%52.00%
26Mat 7  
27Mat 81.00%0.00%
28Mat 9  
29Mat 10  
Costs
Cell Formulas
RangeFormula
C20:C29C20=IFERROR(INDEX(INDIRECT("'"&$F$20&"'!C4:H4"),MATCH($B20,INDIRECT("'"&$F$20&"'!C2:H2"),0)),"")
D20:D29D20=IFERROR(INDEX(INDIRECT("'"&$F$20&"'!C5:H5"),MATCH($B20,INDIRECT("'"&$F$20&"'!C2:H2"),0)),"")
Cells with Data Validation
CellAllowCriteria
F20List=$I$20:$I$24
 
Upvote 0
Toadstool, you are the greatest! Sorry it took me so long to respond, I just got it plugged in at work.
 
Upvote 0
You're welcome and thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,954
Messages
6,122,461
Members
449,085
Latest member
ExcelError

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