Search code examples
excelexcel-formulaexcel-2007vlookup

How to Vlook up this in Excel


I have reference Id and timestamp columns in sheet 1 and sheet 2. Reference Id in the both the sheets are same but not in the same order and timestamp is different in both sheets. What I want to do is to get the timestamp from sheet 1 and sheet 2 for the same reference ID. I need to do it for more than 36000 reference Id cells. Please help.

Sheet 1 Sheet1

Sheet2 enter image description here

Expected Output enter image description here


Solution

  • Is there only one line for each Reference ID in each sheet? How do you need the output? Only the two timestamps?

    Update

    In the expected output sheet you'll have two vlookups:

    Column A | Column A | Column B | Column C | Column D |
    ------------------------------------------------------
    Row 1    | Ref ID 1 |vlookup-1 |vlookup-1 | =(B1-C1) |
    ------------------------------------------------------
    Row 2    | Ref ID 2 |   ''     |   ''     |   ''     |
    ------------------------------------------------------
    Row 3    | Ref ID 3 |   ''     |   ''     |   ''     |
    ------------------------------------------------------
    

    Where

    vlookup1 =VLOOKUP(A1,Sheet1!$A$1:$B$36000,2,FALSE)

    vlookup2 =VLOOKUP(A1,Sheet2!$A$1:$B$36000,2,FALSE)