Consulting

Results 1 to 2 of 2

Thread: create report for list of numbers

  1. #1
    VBAX Newbie
    Joined
    Apr 2009
    Posts
    1
    Location

    create report for list of numbers

    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.

  2. #2
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    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".
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •