Compare Inventory and spit out data

Erichev

New Member
Joined
Aug 6, 2012
Messages
44
I have 2 workbooks that I will copy paste into a third (Macro-enabled) sheet for comparisons. Each contains the week/months inventory. Excel examples at the end

There are 15 columns with column A being the key (computer name). I want to take February's inventory and compare it to January's (then Feb with Mar, etc). The inventory comes in as a one sheet workbook and this is what I would like to have the macro-enabled workbook do for me. BOM will be a constant sheet in the workbook (can change but very infrequent). Column A is the only columns data that is relevant in this macro.

1. Pull in the data from workbook 1 to sheet1 rename sheet to old (Jan)
2. Pull in the data from workbook 2 to sheet2 rename sheet to new (Feb)
3. Remove all lines that, in column A from sheet 2 that start with either CT or DR
3. "BOM" will be a constant sheet in the workbook listing 300+ computers to auto remove from "new" (sheet 1 was done last month)
4. Have the data in "BOM" which only has data in the A column remove the matching devices in column A of "new" and the 14 other columns to the right of the matched column.
6. Clean out all blank spaces on "new" (moving cells up)
7. Using "Old" column A to find missing computers in column A of "New" -- Place this total in F2 of "BOM"
8. Using "New" column A to find missing computers in column A of "Old" -- Place this total in G2 of "BOM"
9. Count the rows in "New" and place this number is H2 of "BOM"

Brief example of what I am looking for:

BOM:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]LT88865[/TD]
[/TR]
[TR]
[TD]LT88868[/TD]
[/TR]
[TR]
[TD]PC88844[/TD]
[/TR]
[TR]
[TD]PC88848[/TD]
[/TR]
[TR]
[TD]PCR33333[/TD]
[/TR]
</tbody>[/TABLE]

Old:
[TABLE="width: 500"]
<tbody>[TR]
[TD]LT23422[/TD]
[TD]Win10[/TD]
[TD]sdaf[/TD]
[TD]asdf[/TD]
[TD]adsf[/TD]
[/TR]
[TR]
[TD]LT23424[/TD]
[TD]Win10[/TD]
[TD]adfs[/TD]
[TD]sdfs[/TD]
[TD]sasdf[/TD]
[/TR]
[TR]
[TD]LT23432[/TD]
[TD]Win10[/TD]
[TD]asdfasd[/TD]
[TD]adfasd[/TD]
[TD]adsfad[/TD]
[/TR]
[TR]
[TD]PC44323[/TD]
[TD]Win7[/TD]
[TD]dsdfs[/TD]
[TD]sdfe[/TD]
[TD]sasdf[/TD]
[/TR]
[TR]
[TD]PC44345[/TD]
[TD]Win8.1[/TD]
[TD]sdaf[/TD]
[TD]asdf[/TD]
[TD]adsf[/TD]
[/TR]
[TR]
[TD]PCR33243[/TD]
[TD]Win2012[/TD]
[TD]sdaf[/TD]
[TD]adfasd[/TD]
[TD]adsfad[/TD]
[/TR]
</tbody>[/TABLE]

New:
[TABLE="width: 500"]
<tbody>[TR]
[TD]LT23422[/TD]
[TD]Win10[/TD]
[TD]sdaf[/TD]
[TD]asdf[/TD]
[TD]adsf[/TD]
[/TR]
[TR]
[TD]LT23444[/TD]
[TD]Win10[/TD]
[TD]sdaf[/TD]
[TD]dsfds[/TD]
[TD]sdfad[/TD]
[/TR]
[TR]
[TD]LT23445[/TD]
[TD]Win7[/TD]
[TD]asdf[/TD]
[TD]sdfsada[/TD]
[TD]sdgfsa[/TD]
[/TR]
[TR]
[TD]PC44322[/TD]
[TD]Win18[/TD]
[TD]asldf[/TD]
[TD]sdaf[/TD]
[TD]safd[/TD]
[/TR]
[TR]
[TD]PC44345[/TD]
[TD]Win8.1[/TD]
[TD]sdaf[/TD]
[TD]asdf[/TD]
[TD]adsf[/TD]
[/TR]
[TR]
[TD]LTC33456[/TD]
[TD]Win10[/TD]
[TD]asdf[/TD]
[TD]asdf[/TD]
[TD]asdfa[/TD]
[/TR]
</tbody>[/TABLE]


F2 = 62 computers removed
G2 = 55 computers added
H2 = 2245 computers on sheet "New"
****** id="cke_pastebin" style="position: absolute; top: 559.5px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">[TABLE="width: 500"]
<tbody>[TR]
[TD]Win10[/TD]
[/TR]
</tbody>[/TABLE]


I hope this is easy to understand. Sheet "New" will then be removed from the workbook and saved as it's own workbook to the desktop with the the title "workstation_count-RU2-YYYYMMDD"

I have no idea where to start and would appreciate any assistance you can provide. Maybe this would be easier with a formula instead of a macro. I'm going to try to work on this tonight, but I wanted to get it on paper before I started.

Thank you in advance
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

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