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

Data Analysis

  • Add Outline to Data in Excel
  • What-If Analysis: Scenarios and Goal Seek in Excel
  • How to add Trendline to a chart in Excel
  • How to calculate current stock or inventory in Excel
  • Calculate Conditional Percentile ‘IF’ in table in Excel

References

  • Get nth match with INDEX / MATCH in Excel
  • Extract all partial matches in Excel
  • How to create dynamic named range with OFFSET in Excel
  • Lookup entire row in Excel
  • Perform case-sensitive Lookup in Excel

Data Validations

  • Excel Data validation date in specific year
  • Data validation must not exist in list
  • Excel Data validation exists in list
  • Excel Data validation date in next 30 days
  • Excel Data validation only dates between

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.

Worked Example:   LOOKUP function: Description, Usage, Syntax, Examples and Explanation

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.

Worked Example:   Get last match cell contains in Excel

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.

Worked Example:   Lookup value between two numbers in Excel

Post navigation

Previous Post:

Weighted average in Excel

Next Post:

Win loss points calculation 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

  • AND function: Description, Usage, Syntax, Examples and Explanation
  • Not Equal To ‘<>‘ operator in Excel
  • How to use Excel XOR Function
  • IF with wildcards in Excel
  • Nested IF function example in Excel

Date Time

  • Get last working day in month in Excel
  • Assign points based on late time in Excel
  • Display Days until expiration date in Excel
  • How to calculate next anniversary date or birthday in Excel
  • MONTH function: Description, Usage, Syntax, Examples and Explanation

Grouping

  • Group times into 3 hour buckets in Excel
  • Group numbers with VLOOKUP in Excel
  • Group numbers at uneven intervals in Excel
  • How to randomly assign data to groups in Excel
  • Running count group by n size in Excel

General

  • Advanced Number Formats in Excel
  • Excel Ribbon Quick Overview For Beginners
  • Excel Autofill Cell Ranges, Copy, Paste
  • Creating and Opening an existing file in Excel
  • Share Excel data with Word documents
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning