Help with combining different values

criswilk

New Member
Joined
Sep 5, 2006
Messages
9
Hi,

I need some help combining the Opening Balance, Sales, Receipts, Adjustments & Oh Hand stock from 2 warehouses for cases and units.

This is normally done by manually keying the data source and then using =INT(((SUM('Data Source'!D5)*6)+'Combined Totals'!D68)/6) in the Combined totals sheet. Cases get converted to units, then the units are added and then divided by the case qty to show total cases. This same process is done on the units using =((SUM('Data Source'!D5)*6)+'Data Source'!D68)-INT(((SUM('Data Source'!D5)*6)+'Data Source'!D68)/6)*6.

Unit codes are the same as the case but with a 9 in the front and also make up to 4 numeric characters. ie case code 79 = 9079 as a unit code or case code 256 = 9256 as a unit code.

I would also like to get the case qty from the Prod File Sheet instead of manually adjusting each formula.

Combined Totals
<b>Excel 2007</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="font-weight: bold;;">Code</td><td style="font-weight: bold;text-align: center;;">O/Bal</td><td style="font-weight: bold;;">Sales</td><td style="font-weight: bold;;">Rec'd</td><td style="font-weight: bold;;">Adjust</td><td style="font-weight: bold;;">C/Bal</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="text-align: right;;">79</td><td style="text-align: right;;">4</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style="text-align: right;;">256</td><td style="text-align: right;;">43</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style="text-align: right;;">261</td><td style="text-align: right;;">55</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style="text-align: right;;">277</td><td style="text-align: right;;">24</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style="text-align: right;;">391</td><td style="text-align: right;;">19</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">7</td><td style="text-align: right;;">398</td><td style="text-align: right;;">25</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">8</td><td style="text-align: right;;">400</td><td style="text-align: right;;">20</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">9</td><td style="text-align: right;;">401</td><td style="text-align: right;;">13</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">10</td><td style="text-align: right;;">402</td><td style="text-align: right;;">14</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">11</td><td style="text-align: right;;">403</td><td style="text-align: right;;">8</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">12</td><td style="text-align: right;;">404</td><td style="text-align: right;;">11</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">13</td><td style="text-align: right;;">9079</td><td style="text-align: right;;">1</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">14</td><td style="text-align: right;;">9256</td><td style="text-align: right;;">0</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">15</td><td style="text-align: right;;">9261</td><td style="text-align: right;;">3</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">16</td><td style="text-align: right;;">9277</td><td style="text-align: right;;">1</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">17</td><td style="text-align: right;;">9391</td><td style="text-align: right;;">4</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">18</td><td style="text-align: right;;">9398</td><td style="text-align: right;;">3</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">19</td><td style="text-align: right;;">9400</td><td style="text-align: right;;">2</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">20</td><td style="text-align: right;;">9401</td><td style="text-align: right;;">3</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">21</td><td style="text-align: right;;">9402</td><td style="text-align: right;;">3</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">22</td><td style="text-align: right;;">9403</td><td style="text-align: right;;">3</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">23</td><td style="text-align: right;;">9404</td><td style="text-align: right;;">0</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr></tbody></table><p style="width:3em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Combined Total</p><br /><br />

Data Source
<b>Excel 2007</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="font-weight: bold;;">Code</td><td style="font-weight: bold;text-align: center;;">O/Bal</td><td style="font-weight: bold;;">Sales</td><td style="font-weight: bold;;">Rec'd</td><td style="font-weight: bold;;">Adjust</td><td style="font-weight: bold;;">C/Bal</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="text-align: right;;">79</td><td style="text-align: right;;">3</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">3</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style="text-align: right;;">256</td><td style="text-align: right;;">35</td><td style="text-align: right;;">3</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">31</td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style="text-align: right;;">261</td><td style="text-align: right;;">53</td><td style="text-align: right;;">4</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">48</td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style="text-align: right;;">277</td><td style="text-align: right;;">22</td><td style="text-align: right;;">5</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">16</td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style="text-align: right;;">391</td><td style="text-align: right;;">18</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">18</td></tr><tr ><td style="color: #161120;text-align: center;">7</td><td style="text-align: right;;">398</td><td style="text-align: right;;">23</td><td style="text-align: right;;">1</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">22</td></tr><tr ><td style="color: #161120;text-align: center;">8</td><td style="text-align: right;;">400</td><td style="text-align: right;;">19</td><td style="text-align: right;;">1</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">18</td></tr><tr ><td style="color: #161120;text-align: center;">9</td><td style="text-align: right;;">401</td><td style="text-align: right;;">21</td><td style="text-align: right;;">1</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">19</td></tr><tr ><td style="color: #161120;text-align: center;">10</td><td style="text-align: right;;">402</td><td style="text-align: right;;">12</td><td style="text-align: right;;">1</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">11</td></tr><tr ><td style="color: #161120;text-align: center;">11</td><td style="text-align: right;;">403</td><td style="text-align: right;;">11</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">11</td></tr><tr ><td style="color: #161120;text-align: center;">12</td><td style="text-align: right;;">404</td><td style="text-align: right;;">9</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">8</td></tr><tr ><td style="color: #161120;text-align: center;">13</td><td style="text-align: right;;">9079</td><td style="text-align: right;;">5</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">5</td></tr><tr ><td style="color: #161120;text-align: center;">14</td><td style="text-align: right;;">9256</td><td style="text-align: right;;">8</td><td style="text-align: right;;">7</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">7</td></tr><tr ><td style="color: #161120;text-align: center;">15</td><td style="text-align: right;;">9261</td><td style="text-align: right;;">3</td><td style="text-align: right;;">6</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">3</td></tr><tr ><td style="color: #161120;text-align: center;">16</td><td style="text-align: right;;">9277</td><td style="text-align: right;;">8</td><td style="text-align: right;;">8</td><td style="text-align: right;;">0</td><td style="text-align: right;;">-1</td><td style="text-align: right;;">5</td></tr><tr ><td style="color: #161120;text-align: center;">17</td><td style="text-align: right;;">9391</td><td style="text-align: right;;">4</td><td style="text-align: right;;">4</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td></tr><tr ><td style="color: #161120;text-align: center;">18</td><td style="text-align: right;;">9398</td><td style="text-align: right;;">9</td><td style="text-align: right;;">3</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">6</td></tr><tr ><td style="color: #161120;text-align: center;">19</td><td style="text-align: right;;">9400</td><td style="text-align: right;;">4</td><td style="text-align: right;;">1</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">3</td></tr><tr ><td style="color: #161120;text-align: center;">20</td><td style="text-align: right;;">9401</td><td style="text-align: right;;">6</td><td style="text-align: right;;">4</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">8</td></tr><tr ><td style="color: #161120;text-align: center;">21</td><td style="text-align: right;;">9402</td><td style="text-align: right;;">7</td><td style="text-align: right;;">6</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">1</td></tr><tr ><td style="color: #161120;text-align: center;">22</td><td style="text-align: right;;">9403</td><td style="text-align: right;;">5</td><td style="text-align: right;;">2</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">3</td></tr><tr ><td style="color: #161120;text-align: center;">23</td><td style="text-align: right;;">9404</td><td style="text-align: right;;">8</td><td style="text-align: right;;">5</td><td style="text-align: right;;">0</td><td style="text-align: right;;">0</td><td style="text-align: right;;">9</td></tr></tbody></table><p style="width:6.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Data Source</p><br /><br />

Thanks for your help
Chris
 
Last edited:

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi Chris,

I'm having some difficulty following the relationship between your various worksheets; however it sounds like you have the formulas you need to do your calculations except for the Unit to Case Code conversions.

If your codes are numeric, then you should be able to convert by adding or subtracting 9000.
79 + 9000 = 9079
404+9000 = 9404
9079 - 9000 = 79

Please clarify if I'm misunderstanding your question.
 
Upvote 0

Forum statistics

Threads
1,224,561
Messages
6,179,521
Members
452,923
Latest member
JackiG

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