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:

LT88865
LT88868
PC88844
PC88848
PCR33333

<tbody>
</tbody>

Old:
LT23422Win10sdafasdfadsf
LT23424Win10adfssdfssasdf
LT23432Win10asdfasdadfasdadsfad
PC44323Win7dsdfssdfesasdf
PC44345Win8.1sdafasdfadsf
PCR33243Win2012sdafadfasdadsfad

<tbody>
</tbody>

New:
LT23422Win10sdafasdfadsf
LT23444Win10sdafdsfdssdfad
LT23445Win7asdfsdfsadasdgfsa
PC44322Win18asldfsdafsafd
PC44345Win8.1sdafasdfadsf
LTC33456Win10asdfasdfasdfa

<tbody>
</tbody>


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;">
Win10

<tbody>
</tbody>


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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,214,649
Messages
6,120,731
Members
448,987
Latest member
marion_davis

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