Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2009
    Posts
    6

    Unanswered: Macro to identify & consolidate same value cells

    Hi, I have two columns. Column A has a Stock Material Number. Column B has the quantity of stock required for the corresponding Stock Material Number. I am trying to create a macro that searches column A, identifies any repeat stock material numbers and then consolidates all the repeat numbers, along with the sum of all the quantities into one line.

    eg: Stock Material Number 123456 shows up in rows 1, 3 & 16. Each occurrence requiring a quantity of 2.

    The macro would run leaving only 1 row showing only 1 occurrence of Stock Material Number 123456 and a quantity of 6.

    Any help would be greatly appreciated.

    Thanks.

  2. #2
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    Hi,

    You don't really need a macro to do this. Either the data consolidation tool or a pivot table will give you this summary.

    There's a Bill Jelen podcast showing how to use the consolidate feature here:
    Learn Excel Episode 929: Data Consolidate :: Tech Videos, Screencasts, Webinars, Techtalks, Tutorials

    Is that something you can work with?

  3. #3
    Join Date
    Apr 2009
    Posts
    6

    Thumbs up

    GOLD.... Thank you friend.

Posting Permissions

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