+ Reply to Thread
Results 1 to 4 of 4

Quickest way to merge values with data on separate rows but with same unique reference

  1. #1
    Registered User
    Join Date
    09-20-2016
    Location
    Worcester, UK
    MS-Off Ver
    2010
    Posts
    49

    Quickest way to merge values with data on separate rows but with same unique reference

    Hello,

    I have a large amount of data cleansing to do and I'm sure there is a quick way to do this but I can't find anything on Google - maybe I'm not entering the right buzzwords.

    Please see attached and first column - Vendor No.. I've had to replace Vendor Name with Vendor A for confidentiality purposes.

    As you can see (if you scroll down) some Vendors have the same Vendor Number - I need to merge the values for each duplicate Vendor Number so that there is just one Vendor Number with the aggregated value of the duplication.

    EG Vendor No 1940 is duplicated and if the value is merged it will equal £60,460.06

    Now I can do this manually but it will take a longggggg time! Is there anyway I can do this quickly without having to manually merge and add?

    Thanks in advance!!
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,421

    Re: Quickest way to merge values with data on separate rows but with same unique reference

    First of all you need to get a unique list of Vendor numbers. You can do this easily by using Advanced Filter:

    In the panel click on Copy to another location
    List Range: $A$1:$A$10866
    Put $I$1 in Copy To box
    Click on Unique Records only
    Click OK.

    Copy the titles from B1:G2 into cells starting from J1, and adjust the column widths to suit.

    Then you need to get the names that go with those numbers - put this formula in J3:

    =VLOOKUP(I3,A:B,2,0)

    then copy down by double-clicking the fill handle (the small black square in the bottom right corner of the cursor, with J3 selected)

    Then you need to add the values for each vendor number - put this formula in K3:

    =SUMIF($A:$A,$I3,C:C)

    Format the cell as you wish to see it (use the Format Painter from cell C3), then copy the formula across into L3:O3, and then you can copy the formulae down the rows using the fill handle as before.

    You can fix the values of these formulae, and then you can delete columns A to H.

    Hope this helps.

    Pete

  3. #3
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Quickest way to merge values with data on separate rows but with same unique reference

    Hi
    1st. - copy the values of column A and paste them in a new sheet
    2nd. - Select in the new sheet the column A and go to data->remove duplicates
    3rd. - Use in column B (in B3) the following formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    4th. - Use in C3 the following formula and copy down and right to G10866
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    see the file
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-20-2016
    Location
    Worcester, UK
    MS-Off Ver
    2010
    Posts
    49

    Re: Quickest way to merge values with data on separate rows but with same unique reference

    Thank you Jose and Pete. Both solutions worked!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Combine/merge duplicate rows but retain unique data
    By Natalie Hanlon in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-02-2015, 01:22 PM
  2. Merge Duplicate Rows and Combine Unique Data
    By rickt33 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-08-2015, 09:12 PM
  3. [SOLVED] Quickest way to gather unique values in column - preferably without looping
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-04-2015, 11:23 AM
  4. How to merge duplicate rows with some unique data with VBA code
    By katkur in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-04-2013, 11:17 AM
  5. Appending data from two separate and unique spreadsheets using reference columns
    By dcilley@live.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2013, 12:18 AM
  6. Merge Duplicate Rows unique values into single rows for an infinite amount of columns/rows
    By aimeecrystalaid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2013, 08:43 PM
  7. Replies: 3
    Last Post: 07-07-2011, 08:24 PM

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