+ Reply to Thread
Results 1 to 9 of 9

Looking up data between two sheets and auto filling a field

  1. #1
    Registered User
    Join Date
    08-17-2015
    Location
    Essex, England
    MS-Off Ver
    Office Excel 2007
    Posts
    32

    Looking up data between two sheets and auto filling a field

    Hi guys,

    Just started out on getting into the depths of excel and need some help please!

    I have two spreadsheets:

    One has a list of around 2000 towns around the UK (Column Q, sheet 1) , the other is a list of ALL towns in the UK (Column A, sheet 2) with corresponding counties next to them (Column B, sheet 2).

    I'm looking for a formula that will compare the towns in sheet one with those in sheet 2 and where there are matches, transfer the counties from sheet 2 into sheet 1.

    I've looked all over but am hitting a brick wall!

    Please help!!!

    Thanks in advance

    Beatnik10

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Looking up data between two sheets and auto filling a field

    Hi,

    Try the following formula in Sheet1! P2 or R2:

    =VLOOKUP(Q2,Sheet2!A:B,2,0)

  3. #3
    Forum Contributor LokeshKumar's Avatar
    Join Date
    03-31-2015
    Location
    India
    MS-Off Ver
    All, mostly 2010 now..
    Posts
    471

    Re: Looking up data between two sheets and auto filling a field

    Hi,
    It will not take much time to upload sample file.....please do that.....
    Lokesh Kumar
    Stay Hungry.. Stay Foolish..
    _________________________________________________________
    Please Click STAR to Add Reputation if my/someone's answer helped!

  4. #4
    Registered User
    Join Date
    08-17-2015
    Location
    Essex, England
    MS-Off Ver
    Office Excel 2007
    Posts
    32

    Re: Looking up data between two sheets and auto filling a field

    Hopefully i've attached a sample.

    The list i have is of 7000 town names, 5000 already had counties so i've just filtered my list to those without - whether that matters i don't know!

    Thanks again
    Attached Files Attached Files

  5. #5
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Looking up data between two sheets and auto filling a field

    In B2 (Sheet1!):

    =VLOOKUP(A2,Sheet2!A:B,2,0)

  6. #6
    Registered User
    Join Date
    08-17-2015
    Location
    Essex, England
    MS-Off Ver
    Office Excel 2007
    Posts
    32

    Re: Looking up data between two sheets and auto filling a field

    Fantastic! Great stuff!!

    Quite a few blanks but that'll just be because they arn't mentioned on sheet2.

    If you wouldn't mind, could you give a brief breakdown of that formula so i can understand which bit is doing what?

    Quite a newbie at this so just trying to learn as i go!

    again, thankyou!

  7. #7
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Looking up data between two sheets and auto filling a field

    =VLOOKUP(A2,Sheet2!A:B,2,0)

    In this case VLOOKUP function picks up the content from cell A2 (Sheet1!) and looks for a match in Column A (Sheet2!). Once a match is found, it returns the content from column B from the same row.


    Please go through the following URL for details on VLOOKUP function:

    https://support.office.com/en-in/art...8-93a18ad188a1

  8. #8
    Registered User
    Join Date
    08-17-2015
    Location
    Essex, England
    MS-Off Ver
    Office Excel 2007
    Posts
    32

    Re: Looking up data between two sheets and auto filling a field

    Legend!

  9. #9
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Looking up data between two sheets and auto filling a field

    Thank you

    If that takes care of your question, please mark this thread as Solved by selecting Thread Tools --> Mark thread as solved.

+ 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. Auto-filling data from one worksheet to another
    By PDXSerric in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-18-2013, 06:41 PM
  2. Auto-filling formulas across multiple sheets
    By kestefon in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-20-2013, 08:35 PM
  3. [SOLVED] Filling TextBox with data from database when a ComboBox field is chosen
    By alopecito in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-01-2012, 11:34 AM
  4. Auto filling data from one spreadsheet to another
    By Papalue in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-06-2012, 10:11 PM
  5. Excel 2007 : Auto - dynamic data filling
    By Arazmus in forum Excel General
    Replies: 0
    Last Post: 02-02-2009, 07:14 AM
  6. Filling in a field based on values in another field in same row
    By middletree in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-07-2008, 01:34 PM
  7. Auto filling cells across mutliple sheets
    By Alec H in forum Excel General
    Replies: 5
    Last Post: 02-06-2006, 10:39 AM

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