+ Reply to Thread
Results 1 to 5 of 5

Sorting based on corresponding cell

  1. #1
    Registered User
    Join Date
    05-25-2007
    Posts
    19

    Sorting based on corresponding cell

    Here is what i am trying to do.

    I have 3 columns. Column "A" takes in part numbes. Column "B" takes in quantities, and Column "C" contains the origin of the part.

    I wrote a macro to sort based on the Origin of all data entered, but it there are 2 like part numbers, it lists them twice.

    Example

    Cat 1 Animal
    Cat 2 Animal
    Dog 1 Animal
    Car 1 Transportation

    The animal names being part numbers


    I want to be able to add another part onto my macro to automaically cominbed multiple instances. So instead of it showing two instances of "Cat", it shows one instance of "Cat" but with the total quantity of 3.


    ~BCR~

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

    1) Can we see your existing code
    2) Where do you want the consolidated output to appear?

    rylo

  3. #3
    Registered User
    Join Date
    05-25-2007
    Posts
    19
    Well, for some reason, now it sends my sorting results to the end of the sheet, but here is the coding.

    Please Login or Register  to view this content.

    What i am wanting is for it to sort based on the origin, and then combined like part numbers' quantites, and place the result starting at row 3.
    Last edited by rylo; 06-18-2008 at 06:33 PM.

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

    Time for an example workbook. The first sheet can show your raw data, and the second sheet shows how you want the output structured. Sorting the data in place is not going to cumulate duplicate items, just arrange them together. If you want to cumulate, then you will have to create a unique list somewhere, then bring in the cumulated totals. Maybe a pivot table???

    rylo

  5. #5
    Registered User
    Join Date
    05-25-2007
    Posts
    19
    I was trying to avoid having to have someone use a pivot table, but it looks like that is going to be the best bet.

    Thank you for all of your time and help.
    ~BCR~

+ 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