Forum Discussion

anupambit1797's avatar
anupambit1797
Steel Contributor
May 14, 2025
Solved

Vlookup or any better function

Dear Experts,

                 Greetings!

I have a data like below:-

Sheet 1 & 2, and have to fetch the data from 2 -> 1.

 

If , I use Vlookup with True(approximate match) then it populates many times , but I want to populate the exact time from sheet-2 and put it in sheet-1 when the RRC(Column F) triggered example shown as 1st line from Sheet2

 

What's the best way to achieve this, we work in terms of ms( milliseconds ) so can't do any Approximations.

 

Thanks in Advance,

Br,

Anupam

  • HansVogelaar's avatar
    HansVogelaar
    May 14, 2025

    Does this do what you want?

    =LET(t, IFERROR(LOOKUP(A2, '2'!A:A), ""), IF(COUNTIF(B$1:B1, t), "", t))

9 Replies

  • That would be

    =IF(COUNTIF(B$1:B1, IFERROR(LOOKUP(A2, '2'!A:A), "")), "", IFERROR(LOOKUP(A2, '2'!A:A), ""))

  • You mention "I want to populate the exact time", but there are no exact matches. So what is the expected/desired result?

    • anupambit1797's avatar
      anupambit1797
      Steel Contributor

      Hi HansVogelaar​ , Sorry I wasn't clear earlier, I meant like this:-

      So, in Column B(say) populate the time( blue) from the sheet2, which is just after the one in Column A in sheet-1

       

      • HansVogelaar's avatar
        HansVogelaar
        MVP

        Does this do what you want?

        =LET(t, IFERROR(LOOKUP(A2, '2'!A:A), ""), IF(COUNTIF(B$1:B1, t), "", t))

Resources