If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Macro to identify & consolidate same value cells

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-06-09, 17:16
Dalman71 Dalman71 is offline
Registered User
 
Join Date: Apr 2009
Posts: 6
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.
Reply With Quote
  #2 (permalink)  
Old 11-06-09, 17:33
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 495
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?
Reply With Quote
  #3 (permalink)  
Old 11-06-09, 18:24
Dalman71 Dalman71 is offline
Registered User
 
Join Date: Apr 2009
Posts: 6
Thumbs up

GOLD.... Thank you friend.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On