+ Reply to Thread
Results 1 to 11 of 11

Count Column D and Show

  1. #1
    Registered User
    Join Date
    06-05-2009
    Location
    New Mexico, USA
    MS-Off Ver
    Excel 2003
    Posts
    25

    Count Column D and Show

    I am trying to count up the quantities in Column D of the attachment, which I can do with (Macro A) and then display them in a table format which I could do with (Macro B) if I wasn’t trying to include Column D. Basically I am trying to get Sheet1 to become Sheet2. If you can help, thank you.

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Cherub; 07-15-2009 at 09:50 PM. Reason: SOLVED

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Count Column D and Show

    Hi

    Have you tried using a Pivot table?


    rylo

  3. #3
    Registered User
    Join Date
    06-05-2009
    Location
    New Mexico, USA
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Count Column D and Show

    Hi Mr. Rylo,

    Thank you for your feedback. I have used a pivot table many times and for my purposes a macro would be best. Thank you again for the input, I appreciate your feedback.

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Count Column D and Show

    Hi

    Could you not record a macro to create the pivot table, and then convert it to a value paste?

    rylo

  5. #5
    Registered User
    Join Date
    06-05-2009
    Location
    New Mexico, USA
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Count Column D and Show

    Thank you for the tip. Perhaps I am doing something incorrectly. I've tried recording many macros to create pivot tables, but I have found that as the data changes that is used to create the original pivot table recording the accuracy declines.


    When you say convert it to a value paste? Do you mean copy the output of pivot table macro and then do paste value?

  6. #6
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Count Column D and Show

    Hi

    1) Use the macro to create the outline of the pivot creation code, then either use defined names, or adjust the code to get the data scope items from the new data. If you just record it, then the range will be static, but you can dynamically build the range from the size of the data.

    2) Yep, but it is the output of the pivot table, not the pivot table macro. Build the Pivot table, copy it, then output the result as a value paste. If you build the pivot onto a new sheet, then, once you have copied/pasted the output, you can delete the pivot sheet.

    rylo

  7. #7
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Count Column D and Show

    Hi

    Run the below code on your example file and it should give you the output expected.

    Please Login or Register  to view this content.
    rylo

  8. #8
    Forum Contributor
    Join Date
    10-08-2006
    Location
    Walnut, CA
    MS-Off Ver
    2003,2010, Office 365
    Posts
    114

    Re: Count Column D and Show

    Hi,
    A non-pivot table solution. Click on the button and the output tablle will be created on SHEET3.
    Tony
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    06-05-2009
    Location
    New Mexico, USA
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Count Column D and Show

    Thank you Rylo this is amazing. I am grateful very much for your help.

  10. #10
    Registered User
    Join Date
    06-05-2009
    Location
    New Mexico, USA
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Count Column D and Show

    Thank you TonyS. This is cool stuff!

  11. #11
    Registered User
    Join Date
    06-05-2009
    Location
    New Mexico, USA
    MS-Off Ver
    Excel 2003
    Posts
    25

    Solved

    Solved. Solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1