+ Reply to Thread
Results 1 to 6 of 6

Matching an id from a sheet then copying correspondent value from a second sheet

  1. #1
    Registered User
    Join Date
    03-28-2016
    Location
    California
    MS-Off Ver
    2007
    Posts
    43

    Matching an id from a sheet then copying correspondent value from a second sheet

    Hi there,

    Yesterday I asked a very similar question but tried using a variation of the given formula for this case and didn't work. (Sorry for asking too much)

    I have a sheet called 'HOURS' with 1344 employees with their EmployeeID on column A. I have another sheet called 'DOB' with 1296 employees with also their EmployeeID on column A.

    The first sheet is missing the DOB which, surprisingly enough, is contained within the DOB sheet. The problem is both employee lists aren't consistent and not sorted alphabetically. Also, the list 'HOURS' still has employees that are no longer employed.

    I need to take the EmployeeID from 'HOURS', match it with its correspondent value in 'DOB', copy the Date of Birth, then write it back in the empty DateOfBirth column in 'HOURS'. In both sheets the value DateOfBirth is in column F.

    John gave me this formula yesterday =VLOOKUP(DATEDIF($D6,TODAY(),"y"),CalChoice!$A$3:$C$54,2,1) which I tried to modify to meet this new requirement but of course I failed.

    Any help would be appreciated.

    Thanks!

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Matching an id from a sheet then copying correspondent value from a second sheet

    Assuming DOBs in Column B (the 2nd Column)

    =VLOOKUP(HOURS!$A2,DOB!$A$2:$A$1296,2,0)
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Contributor
    Join Date
    01-04-2013
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2013
    Posts
    142

    Re: Matching an id from a sheet then copying correspondent value from a second sheet

    Try copying this formula in column F of the 'Hours' sheet.

    =VLOOKUP($A1,DOB!$A$1:$F$1296,6)

    This is assuming the Employee IDs start on row 1 of both sheets and the last row with Employee IDs on the 'DOB' sheet is row 1296. You may have to adjust the formula accordingly if the start and end rows are different.

  4. #4
    Registered User
    Join Date
    03-28-2016
    Location
    California
    MS-Off Ver
    2007
    Posts
    43

    Re: Matching an id from a sheet then copying correspondent value from a second sheet

    Thank you so much! both ways worked perfectly.

    Now I have (another) related question

    I was just requested to filter this data adding age as a parameter, but to a specific date.

    I'm using the formula =VLOOKUP(DATEDIF($F2,TODAY(),"y"),Rates!$A$5:$C$80,2,1) that John gave me yesterday and it works PERFECTLY. But instead of TODAY (03/29/2016) I need the validation date for age to be 05/01/2015. I tried to put manually 05/01/2015 instead of TODAY() and of course it didn't work.

    Thanks!

  5. #5
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Matching an id from a sheet then copying correspondent value from a second sheet

    =VLOOKUP(DATEDIF($F2,Date(2015,5,1),"y"),Rates!$A$5:$C$80,2,1)

  6. #6
    Registered User
    Join Date
    03-28-2016
    Location
    California
    MS-Off Ver
    2007
    Posts
    43

    Re: Matching an id from a sheet then copying correspondent value from a second sheet

    Thank you daffodil!

    I have to say this is the most useful forum I've used in my life. Thanks a lot!

+ 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. Replies: 10
    Last Post: 04-24-2014, 01:00 PM
  2. Matching two columns and copying the corresponding rows to a new sheet
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-17-2014, 06:40 AM
  3. Matching data and copying row to different sheet
    By DanishDudeAU in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-29-2013, 04:59 AM
  4. [SOLVED] Correspondent data matching, Formula IF(COUNTIF)
    By LemitoSanchez in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-22-2013, 05:42 AM
  5. Pattern matching and then copying PasteSpecial to another sheet
    By hanott1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-12-2011, 04:31 PM
  6. Matching one to many from one sheet to another, then copying
    By bluegnu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-10-2009, 06:49 AM
  7. Matching Values and Copying to A new sheet.
    By adienspade in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-20-2008, 06:51 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