Reverse lookup


In my research and tutoring excel, I have found that many people find Reverse lookup concept to be among the top 10 complicated things in excel. This article hopes to shed more light than heat in demystifying the Reverse Lookup in excel.

In the normal lookup, we use the Column and/or Row header to return the value that falls in the intersection. But in the reverse lookup, we shall use the value to return the column and/or row header

For example, say you have below appointments Calendar and you want to lookup &  return the scheduled date & time for customer Joy Bell

Reverse lookup

There are 4 ways to carry out this kind of a Reverse Lookup;



How it works:

The trick is to break down the formula into small parts;

  1. INDEX(D3:G3,0,SUMPRODUCT(–(D4:G14=I3)*(COLUMN(D3:G3)-COLUMN(D3)+1))) this is the part that looks up the Date values in the columns

►SUMPRODUCT(–(D4:G14=I3)*(COLUMN(D3:G3)-COLUMN(D3)+1))  returns a column number given a criteria i.e.

  • – -(D4:G14=I3) →returns an array of 1 & 0. 1 represents where criterion is met
  • (COLUMN(D3:G3)-COLUMN(D3)+1)→ returns an array of relative positions of the columns

SUMPRODUCT takes up the 2 arrays and  using the techniques of conjunction truth table returns 3

►INDEX(D3:E3,0,3) returns the value in column 3 given the range D3:E3= 13-05-2016

        2. INDEX(C4:C14,SUMPRODUCT(–(D4:G14=I3)*(ROW(C4:C14)-ROW(C4)+1)) this is the part that looks up the Time values in the rows.

The breakdown of the formula is the same as explained above other than INDEX looks up the rows instead of columns.

When you combine the two parts you form a DateTime Value which you can custom format to fit.

=INDEX(D3:E3,0,3)+INDEX(C4:C14,5) = 13-05-2016  12:00:00 PM

2.Using Array Formula (INDEX & MAX)


How it works:

  1. =INDEX(D3:G3,MAX((D4:G14=I7)*(COLUMN(D3:G3)-COLUMN(D3)+1))) like in the SUMPRODUCT formula, this is the part that looks up the Date Value

(D4:G14=I7)*(COLUMN(D3:G3)-COLUMN(D3)+1) this part generates an array of Column number where the criteria is met and zero for the rest.


MAX function returns the  maximum number in the array


INDEX(D3:E3,0,3) returns the Date Value.

  1. INDEX(C4:C14,MAX((D4:G14=I7)*(ROW(C4:C14)-ROW(C4)+1))) this generates the Time Value

The same breakdown works with the Time Value.

NB: This is an Array formula so remember to Ctrl + Shift +Enter

3. Using Array Formula (SMALL & IF)


This is the shortest and easiest to understand.

First, you need to understand how Excel stores date and time  i.e. dates as serial numbers and time as a fractional portion of a 24 hour day.

Secondly, you need to understand that a  DateTime Value is just a sum of this Date serial Number and fractional Time Value.

►(D3:G3+C4:C14) returns a two-dimensional array of DateTime Value


►IF(D4:G14=I10,(D3:G3+C4:C14)) returns an array of the DateTime value that meets the criteria


►SMALL returns the first smallest number in the array =42503.5

►Format the number “dd-mm-yyyy h:mm AM/PM” = 13-05-2016 12:00PM


Other than INDEX & SUMPRODUCT combination this is the other NON-Array formula you can use to do this Reverse lookup


How it works;

Watch these Videos on AGGREGATE Function.





Spread the love


  1. Deb says:

    Hi, would you mind writing out the equation in layman terms please so I can understand the formulae.

    1. Hi Deb.
      The trick into understanding the formula is knowing how to create an arrary using criteria.

      Please watch below videos to understand the AGGREGATE Function first. It will make the the reverse lookup easier to understand.

  2. Benson says:

    Just came by your blog. It’s amazing and I have it bookmarked for future reference as I like your style of writing. This was a very informative post and really appreciated!

    I noticed an error in the post (or maybe I’ve got my eyes crossed while looking through the formulas). In the blog text in the section: “1. USING INDEX & SUMPRODUCT”, you use E[insert row number] as the ending range of your columns whereas the formulas you actually use in the worksheet as well as code snippets is G[insert row number] .

    For example:
    “►SUMPRODUCT(–(D4:E14=I3)*(COLUMN(D3:E3)-COLUMN(D3)+1)) ”

    Should read: “►SUMPRODUCT(–(D4:G14=I3)*(COLUMN(D3:G3)-COLUMN(D3)+1)) ”

    Mostly cosmetic as most readers will get the crux of the lesson.

    I’ll be lurking through your blog as I find this site so resourceful!

    Asante bwana. Kazi nzuri kweli!

    1. Asante sana Benson!

      Thanks for the correction.

      Glad you found the blog informative

  3. Peter says:

    I do hate direct cell referencing. I wish Dan Bricklin had never invented it!
    I think my solution is your solution 3.
    I define a named formula ‘appointment’ to refer to the formula
    = IF( customer= thisCustomer, date + time )
    As a named formula this will always be evaluated as an array and will give all of ‘thisCustomer’s appointment times. The formula on the worksheet
    = MIN( appointment )
    doesn’t even need to be array entered.

    I haven’t checked your formulas but some reverse lookups fail for multiple matches by returning the row index for one and the column index for the other – giving an utter mess.

    1. Thanks Peter for your comment.

      For multiple matches, I have covered that in this article

Leave a Comment:

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.