I think I've designed myself into a corner

TheDude0901

New Member
Joined
Jan 9, 2014
Messages
10
Greetings,

I'm an old database guy and I think it's caused me to design my Excel app in a way that won't work very well. I am trying to design a spreadsheet to track paint usage and emissions for environmental reporting. Anyone dealing with a Title V permit will know exactly what I'm talking about. Anyway, I need to track the type of paint, quantity used, the specific chemicals in each paint and calculate the amounts of those chemicals based upon the amount of paint. So, I've started laying out tables, or worksheets in the Excel world, in a way to do this.

Since pictures are better than words, here's what my tables look like:

Paint Usage
This gets updated every month with our usage data
DatePaint_Part_NumberQuantity
4/1/2015xx-123410
4/1/2015yy-567820
5/1/2015zz-159230
5/1/2015xx-123415
6/1/2015yy-567810

<tbody>
</tbody>

Paint Properties
This is a fixed table and is used for lookup.
Part Part NumberPaint NameTypeDensity (lb/gal)1111-11-12222-22-23333-33-34444-44-45555-55-56666-66-6
xx-1234BlueLiquid9.5845%27%10%
yy-5678BlackLiquid12.8915%34%19%
zz-1592YellowLiquid11.145%45%

<tbody>
</tbody>

Chemical Properties
This is a fixed table used for lookup
Chemical NumberChemical NameReportableReportable Quantity (lbs)
1111-11-1Bad StuffYes10000
2222-22-2Really Bad StuffYes100
3333-33-3Not so bad stuffNo
4444-44-4PigmentNo
5555-55-5Really, really bad stuffYes10

<tbody>
</tbody>


What I need is the following:
I need to get a breakdown of the chemical usage with the chemical numbers as rows and the month/date as the columns. It needs to be summarized by month and then a total across the dates.

Chemical NameChemical Number4/1/2015 (lbs)5/1/2015 (lbs)6/1/2015 (lbs)Total (lbs)
Bad Stuff1111-11-11521229
Really Bad Stuff2222-22-25712
Not so bad stuff3333-33-310203060
Total302942101

<tbody>
</tbody>

To find these number it's
Paint Quantity * Density * Percent of Chemical

Getting paint quantities was easy with a pivot table. However, I'm not sure where to go next. I thought I may need to somehow create another pivot table with the paint information and then another pivot table with the paint and chemical pivot tables included.... I don't know....

This final chemical summary needs to be dynamic as the paint usage will vary through the year. Also, it's on a rolling year so when I add June 2015 data, June 2014 will fall off.

Now, if this was a SQL database I could write a query to get me what I need. However, this is Excel and I'm kinda out of my element.

Perhaps I'm laying out the tables all wrong? Any suggestions are more than welcome.

best regards,
The Dude
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
No you haven't painted yourself into a corner.
Your primary reporting tool (in my opinion) is PivotTables. You could accomplish your chemical component calculation with related data tables in Pivot Tables, Helper columns or calculated fields for Pivot Tables. (Your background with SQL may give you an advantage in learning the DAX.)
Helper columns can be easier to implement in some ways but adds to the clutter and formula load on the sheet.

The calculated field option is my main suggestion and your existing tables could easily be used for named constants giving you your breakdowns. I'm getting into my month-end so excuse me if I don't ad much else.
 
Upvote 0
Greetings,

I've tried several variations of pivot tables using the chemical properties but I'm getting nowhere. I believe I need to use calculated fields but I don't know how to add them in the pivot table. It always wants an existing row/column. I just can't create a new one on the fly.

I can't make the mental leap to join the paint usage pivot table with the paint properties and chemical properties to come up what I need. I __feel__ like it __should__ be done using a pivot table but I don't know where to go from there.

I'm completely stuck at this point. Can anyone help???

Best regards,
The Dude
 
Last edited:
Upvote 0
Can you PM a link to a sample copy of your data?
PS.What version of Excel are your using? 2007,2010 2013 or other?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,068
Messages
6,122,950
Members
449,095
Latest member
nmaske

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