Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Working With Tables in Excel
  • How to create running total in an Excel Table
  • How to calculate average last N values in a table in Excel
  • How To Insert and Customize Sparklines in Excel
  • Example of COUNTIFS with variable table column in Excel

References

  • How to create dynamic named range with OFFSET in Excel
  • Count rows that contain specific values in Excel
  • Vlookup Examples in Excel
  • How to use Excel TRANSPOSE Function
  • How to use Excel LOOKUP Function

Data Validations

  • Excel Data validation must contain specific text
  • Excel Data validation must begin with
  • Excel Data validation require unique number
  • Data validation must not exist in list
  • Prevent invalid data entering in specific cells

Lookup latest price in Excel

by

This tutorial shows how to Lookup latest price in Excel using the example below;

Formula

=LOOKUP(2,1/(item="hat"),price)

Explanation

To lookup the most recent price for an item in a list, where latest items appear last, you can use a formula based on the LOOKUP function. In the example show, the formula in G7 is:

=LOOKUP(2,1/(item=F7),price)

where item is the named range B5:B12, and price is the named range D5:D11.

How this formula works

The LOOKUP function assumes data is sorted, and always does an approximate match. If the lookup value is greater than all values in the lookup array, default behavior is to “fall back” to the last previous value. This formula exploits this behavior by creating an array that contains only 1s and errors, then deliberately looking for the value 2, which will never be found.

LOOKUP searches the array for a value of 2, falls back to the last 1, and returns a value at the corresponding position in the results array.

First, this expression is evaluated:

item=F7

When F7 contains “sandals” the result is:

{FALSE;TRUE;FALSE;TRUE;FALSE;FALSE;TRUE;FALSE}

which next serves as the divisor to 1, producing the final lookup array:

{#DIV/0!;1;#DIV/0!;1;#DIV/0!;#DIV/0!;1;#DIV/0!}

The lookup function looks for 2, then falls back to the last 1 (position 7 in the array), and returns the 7th item on the lookup array, a price of $15.

Post navigation

Previous Post:

How to use Excel CHOOSE Function

Next Post:

Customize Ribbon In Excel

Leave a Reply Cancel reply

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

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • IF with boolean logic in Excel
  • How to use Excel AND Function
  • IFS function: Description, Usage, Syntax, Examples and Explanation
  • XOR function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel NOT Function

Date Time

  • List holidays between two dates in Excel
  • Convert Unix time stamp to Excel date
  • Calculate days remaining in Excel
  • How to get number of days, weeks, months or years between two dates in Excel
  • Convert Excel time to decimal minutes

Grouping

  • Calculate conditional mode with criteria in Excel
  • How to randomly assign data to groups in Excel
  • Map inputs to arbitrary values in Excel
  • Map text to numbers in Excel
  • Group arbitrary text values in Excel

General

  • List worksheet index numbers in Excel
  • How to choose page/paper size in Excel before Printing
  • How to calculate profit margin percentage in Excel
  • Excel Operators
  • 231 Keyboard Shortcut Keys In Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning