+ Reply to Thread
Results 1 to 5 of 5

autofill with adjacent cell reference

Hybrid View

  1. #1
    Registered User
    Join Date
    10-14-2014
    Location
    Ontario, Canada
    MS-Off Ver
    2007
    Posts
    4

    autofill with adjacent cell reference

    I have a large set of data in column B with multiple duplicates and I am in the middle of entering data into column A.

    I would like to find a way that once I enter the data into column A all other "A" fields adjacent to the same B fields will auto populate.

    I do not have a data set to reference for column A as I am finding the data in another software and cannot export it to excel.


    Example:
    Colum A Column B
    ABC 123858
    555658
    123585

    I would like that column A3 auto fill to abc because B1 and B3 are the exact same.
    Last edited by RAexcel; 10-14-2014 at 12:11 PM.

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: autofill with adjacent cell reference

    May be this......

    In A3
    =IFERROR(INDEX(A$1:A2,MATCH(B3,B$1:B2,0)),"")
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: autofill with adjacent cell reference

    This would require VBA.
    Right click on the sheet tab and "View Code" Then paste this in (assumes you are typing into Column A and looking in B for matches)
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Count > 1 Then Exit Sub
    If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
    Beginrow = Target.Row
    Lstrow = Cells(Rows.Count, "B").End(xlUp).Row
    chkval = Target.Offset(0, 1).Value
    
    For i = Beginrow To Lstrow
        If Target.Offset(i, 1).Value = chkval Then
            Target.Offset(i, 0) = Target.Value
        End If
    Next i
    
    End Sub
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    10-14-2014
    Location
    Ontario, Canada
    MS-Off Ver
    2007
    Posts
    4

    Re: autofill with adjacent cell reference

    Thanks ChemistB that works perfectly! Saving me hours of data entry..

    Thanks again

    RA

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: autofill with adjacent cell reference

    Glad to help

+ 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] Autofill adjacent cell after choose from Drop Down List
    By chinitapr in forum Excel General
    Replies: 1
    Last Post: 10-03-2014, 07:35 PM
  2. [SOLVED] autofill until adjacent cell empty
    By Hassan1977 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-03-2013, 01:54 PM
  3. [SOLVED] Autofill Upwards With Reference to Adjacent Column
    By picton2000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2013, 04:12 PM
  4. [SOLVED] Autofill adjacent cell from pre-defined list
    By Seeded_Batch in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 03-23-2012, 06:25 AM
  5. Replies: 1
    Last Post: 06-30-2005, 05:05 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