+ Reply to Thread
Results 1 to 3 of 3

adding two new columns ov info depending if names are correct

  1. #1
    Registered User
    Join Date
    06-28-2012
    Location
    Eire
    MS-Off Ver
    Excel 2003
    Posts
    4

    adding two new columns ov info depending if names are correct

    ok i have two excel files, I want to add two new colums to one ov the files, both colums will be numeric.

    I want it so that if names are equal in one file to the other I can retrive info from the main file.

    Ther will be a case ov duplicate names, the main file contains 5000rows so doing everythin manually is gonna take me a long time....is ther a code I can write and use,

    Even if I got the majority and it highlighted the duplicates?
    anyways if anyone knows be a great help,il check back for replies.if ya need more info i can provide. thanks

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: adding two new columns ov info depending if names are correct

    H

    You don't necessarily need VBA code. Straigtforward XL functionality will do.

    If there are duplicates, are the values you want to get from the duplicate rows all the same or are they different? If they are different you are going to need to decide which of the duplicates should be used to pick up the value.

    So if all values are the same just use a standard VLOOKUP() formula.

    If the values (for the duplicate items) are different and you want the maximum value then sort your data so that the values are in ascending order and then use a VLOOKUP() but without using the fourth optional parameter. Use Copy and Paste Special values to convert the VLOOKUP formulae to values.

    If you want to preserve the order of your data then before doing a sort add a helper column, fill it with the values 1-5000 and include it in the sort so that after the VLOOKUP you can resort back on the original order.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    06-28-2012
    Location
    Eire
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: adding two new columns ov info depending if names are correct

    ok thanks for the reply, bit hard to take everything in ther but iv never used VLOOKUP() So il need bit more detail on that.

    Yes for instance the names, searching by surname will have multiple duplicates so then I would check maybe number or adresses against the name to see if it matched and if I was happy I would copy and paste it across, this was the manual way I was doing it.

    I got as far as surnames begging with "c" after nearly 5 hours doing it so a formula would be nice also ther is instances where ther is no number to check against but ther is otherfields.....its kinda hard to explain. could I add you on instant messanger for help?



    the two fields I am looking for one has a unique code

+ 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