PDA

View Full Version : create report for list of numbers



gvillevo
04-20-2009, 11:59 AM
I have a list of sku's in a sheet named "SKU's" and need vba code to generate an inventory report with two columns, SKU and Quantity. Basically I need the code to go through the list of sku's in sheet one (there are 10000 of them, all in the first column). Then generate a report from the raw data telling me how many of each number there are. The second sheet in the excel file is named "Report" Thanks in advance for the help, I am just learning VBA.

Oorang
04-20-2009, 09:43 PM
You might not really need a macro for that. You can get it done with a pivot table just fine. Just drop "SKU" into the row space on the left, and again into the middle, then double click and change "Sum" to "Count" and you are done.


Data Menu
PivotTable and PivotChart Report
Leave the first screen alone and just click next.
Select the cells in column A and click next.
Select "New Worksheet" and click finish.
From the "Pivot Table Field List" drag and drop SKU to where it says "Drop Row Fields here".
Then drag and drop it again into where it says "Drag and Drop Data Items here."
Right Click on Top Left Cell of the newly created pivot table, then select "Count".