Backfill of Data Based on Subtotals with if Condition

rja3983

New Member
Joined
Oct 20, 2017
Messages
1
I am looking to automate the backfilling of data into lots for an inventory count sheet template. Basically, I need to take the physical count quantites from Col F and distribute them across the lots in Column D for each item. The results are shown in Col G. It seems like an if condition to see if the value in F matches subtotal in E.

Inventory is tracked by Items(Col B) and Lot(Col D). We are looking to update the system information based on a physical count with the #’s indicate in Column E. If the subtotal for each item # in Colum E matches the total for that item in Column F, I need the information in Column E to carry over to Column G

If the quantity in Column E is greater than qty in Col F, the differene needs to be subtracted from the oldest(1st) lot for that item in Column G. If the difference is greater than the quantity subtracted from the first lot, I would want to look to the next oldest lot to subtract the difference.

If the quantity in Column E is less than the qty in Col F, the difference beeds to be added to the newest(last) lot for that item in Column G
Column G are the #s to be imported to the inventory database.

Id (casesafe)Item CodeItem DescriptionLotSystem QOHPhysical CountUpdated Lot QTS
a1g0R0000004bQZQAY11710011.00K OHM 0603 SMT 1%, ERJ-3EK1171001 - 7/7/2011 - Sage500052005000
a1g0R0000004bQYQAY11710011.00K OHM 0603 SMT 1%, ERJ-3EK1171001 - 12/31/2012 - Sage200200
1171001 Total23420025200
a1g0R0000004bQcQAI1171743174K Ohm (0603 SMT 1%)1171743 - 7/3/2007 - Sage28082900
a1g0R0000004bQbQAI1171743174K Ohm (0603 SMT 1%)1171743 - 10/31/2009 - Sage114907
a1g0R0000004bQaQAI1171743174K Ohm (0603 SMT 1%)1171743 - 12/31/2012 - Sage7932808
1171743 Total35152293715
a1g0R0000004bQgQAI1581256SL19 DDR400-512Meg, Generic1581256 - 3/4/2013 - Sage6815068
a1g0R0000004bQfQAI1581256SL19 DDR400-512Meg, Generic1581256 - 12/31/2013 - Sage3737
a1g0R0000004bQeQAI1581256SL19 DDR400-512Meg, Generic1581256 - 12/31/2014 - Sage1414
a1g0R0000004bQdQAI1581256SL19 DDR400-512Meg, Generic1581256 - 12/31/2015 - Sage431
1581256 Total6325024123
a1g0R0000004bQhQAI1581258DMB SODIMM DDR3 2GB1581258 - 12/22/2016 - Sage1166
1581258 Total158125811
a1g0R0000004bQmQAI1581458DMB SODIMM DDR3 4GB1581458 - 6/8/2015 - Sage2676
a1g0R0000004bQlQAI1581458DMB SODIMM DDR3 4GB1581458 - 7/6/2015 - Sage1250
a1g0R0000004bQkQAI1581458DMB SODIMM DDR3 4GB1581458 - 12/31/2015 - Sage770
1581458 Total474437422876

<tbody>
</tbody>
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,214,585
Messages
6,120,394
Members
448,957
Latest member
Hat4Life

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