+ Reply to Thread
Results 1 to 7 of 7

Find matching value in one column to copy adjacent cell on same row

  1. #1
    Registered User
    Join Date
    11-12-2013
    Location
    Denver
    MS-Off Ver
    Excel 2007
    Posts
    2

    Thumbs up Find matching value in one column to copy adjacent cell on same row

    Ok, I've been having trouble with this one for a couple hours now, and getting SO CLOSE but just not quite.

    I have 6 columns, Column A has a set of alphanumeric codes that I need to match to Column F. Column D has another alphanumeric number I want transcribed into B (The D I want is the one from the matching F), Column E has a date I want transcribed into C (Where E is from the same matching F). Since this seems super convoluted, I'll try to show it visually:
    A B C D E F
    221B BC-03 3/3/2013 AD-02 2/2/2013 44F
    31D AF-01 4/4/2013 FA-03 1/1/2013 82C
    44F AD-02 2/2/2013 BC-03 3/3/2013 221B
    82C FA-03 1/1/2013 AF-01 4/4/2013 31D

    So, basically, since A1 and F3 match, I want E3 and D3 to be transcribed into B1 and C1. I have a list of over 2500 items to do this for...

    Thanks!

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Find matching value in one column to copy adjacent cell on same row

    In B1

    =IFERROR(INDEX(D:D,MATCH($a1,$F:$F,0)),"")

    Copy down and across
    Life's a spreadsheet, Excel!
    Say thanks, Click *

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

    Re: Find matching value in one column to copy adjacent cell on same row

    Put this formula in B1:

    =IFERROR(INDEX(D:D,MATCH($A1,$F:$F,0)),"")

    Copy/Paste the formula into C1, and format cell C1 as a date in the style that you prefer (or just use the Format Painter icon to copy the format of E1 into C1). Then you can copy the formulae in cells B1 and C1 down to the bottom of your data - a quick way is to select B1 and then double-click on the fill-handle (the small black square in the bottom-right corner of the cell cursor), and then repeat for C1.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    11-12-2013
    Location
    Denver
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Find matching value in one column to copy adjacent cell on same row

    You two are my heroes! I had MATCH outside of the INDEX formula, so I was getting #VALUE! and #N/A! like crazy. Lifesavers!

    Solved!

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Find matching value in one column to copy adjacent cell on same row

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  6. #6
    Registered User
    Join Date
    01-28-2018
    Location
    blyth
    MS-Off Ver
    2007
    Posts
    2

    Re: Find matching value in one column to copy adjacent cell on same row

    Hello
    I am after a similar solution:
    A1 B1 Updates sheet
    Aintree 58.07%
    Ascot 61.67%
    Ayr 66.10%
    Bangor 67.95%
    Carlisle 70.80%
    Cartmel 55.00%
    Cheltenham 76.85%
    Exeter 72.52%
    Fontwell 61.30%
    Haydock 67.50%
    Haydock 60.00%
    Hexham 74.20%
    Kelso 57.10%
    Kempton 52.50%
    Leicester 57.93%
    Lingfield 65.86%
    Ludlow 62.60%
    Market Rasen 56.73%
    Newbury 65.97%
    Newton Abbot 59.82%
    Perth 84.28%
    Plumpton 69.57%
    Sandown 61.25%
    Sedgefield 66.90%
    Southwell 73.98%
    Stratford 72.05%
    Taunton 62.52%
    Towcester 62.50%
    Warwick 52.55%
    Wetherby 60.27%
    Race Courses and percentages in sheet 'Updates' to match Courses in sheet 2, then paste percentage in ajacent cell in sheet 2.
    A1 B1 SHEET 2
    Ludlow
    Sedgefield
    Wetherby
    Hereford
    Taunton
    Newbury
    Limerick
    Newbury
    Bangor-on-Dee
    Last edited by dublindub; 01-20-2020 at 09:42 AM.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Find matching value in one column to copy adjacent cell on same row

    Quote Originally Posted by dublindub View Post
    Hello
    I am after a similar solution:
    A1 B1 Updates sheet
    Aintree 58.07%
    ...


    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. [SOLVED] Macro to find the empty cell in a column and copy a adjacent row to another column.
    By naga in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-18-2013, 07:44 AM
  2. Need VBA to find matching data between worksheets & copy adjacent rows.
    By Helen62 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-16-2013, 12:19 AM
  3. Replies: 2
    Last Post: 03-28-2012, 11:47 AM
  4. Find matching cell in other sheet and copy cell from different column
    By level3ninja in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-03-2011, 03:29 AM
  5. Search to find matching cells and copy/transpose adjacent data to original sheet?
    By thump4r in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-12-2009, 09:20 PM

Tags for this Thread

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