Function Problems

How to Return Correct Exchange Rate by Date and Currency in Excel

Amos GikundaAmos Gikunda Nov 10, 2026 869 views

Question details

The user needs to automatically retrieve the correct exchange rate based on a specific order date and payment currency when the exchange rate tables are stored in separate ranges.

How to Return the Correct Exchange Rate by Date and Currency in Excel
Product
Excel
Device & OS
not provided
Scenario
Looking up dynamic financial data from multiple separate ranges depending on a specified currency and date condition.
Observed behavior
Exchange rates are successfully populated for each order based on the matching date and currency conditions.
Before you start

Ensure that your separate exchange rate tables are clearly structured and that your date formats match between your order list and your lookup tables to prevent #N/A errors.

Solution 1Recommended

Use IF, INDEX, and MATCH Functions

This method nests INDEX and MATCH inside an IF statement to evaluate the currency first, and then looks up the date in the appropriate currency table.

By combining the IF function with INDEX and MATCH, you can create a dynamic formula that checks the requested currency. Based on that currency, the formula directs the lookup to the correct table, finding the specific date and returning the corresponding exchange rate.

1
Select the target cell

Click on the cell where you want the correct exchange rate to be displayed.

2
Enter the formula

Input the formula: =IF(C2="USD",INDEX($L$2:$L$16,MATCH(B2,$J$2:$J$16,0)),INDEX($H$2:$H$16,MATCH(B2,$F$2:$F$16,0))) into the formula bar. Replace C2 with your currency cell, B2 with your date cell, and the absolute ranges with your specific lookup tables.

3
Apply and drag

Press Enter to execute the formula, then click and drag the fill handle down to apply this logic to the rest of your orders.

Use IF, INDEX, and MATCH Functions
Formula Breakdown: The IF function checks if the currency is USD. If true, it uses MATCH to find the date in the USD table ($J$2:$J$16) and INDEX returns the rate from $L$2:$L$16. If false, it performs the exact same lookup in the alternative currency table ($F$2:$F$16 and $H$2:$H$16).
Advanced Data Lookup in WPS Office

Easily Manage Financial Data and Formulas with WPS Spreadsheet

WPS Spreadsheet provides robust support for complex financial formulas, including IF, INDEX, MATCH, and modern functions. You can easily build automated exchange rate lookup tables to streamline your workflow with full compatibility.

  1. 1. Open your financial dataset: Launch WPS Office and open your workbook containing the order dates, payment currencies, and exchange rate tables.
  2. 2. Apply the multi-condition lookup: Select the target cell and type your IF, INDEX, and MATCH combination to pull the correct exchange rates from your distinct ranges.
  3. 3. Manage data efficiently: Use the built-in Formula tab and Name Manager in WPS Spreadsheet to keep track of your currency tables and ensure error-free calculations.
Fully compatible with Microsoft Excel formulas and formats (.xlsx)Supports advanced lookup functions for complex multi-table queriesUser-friendly Name Manager for organizing currency exchange tablesLightweight architecture ensures smooth performance with large financial datasets
microsoft office alternative - wps office

Frequently Asked Questions

What if my exact order date is not in the exchange rate table?

If the exact date is missing, you can change the match_type parameter in the MATCH function from 0 (exact match) to 1 (less than) or -1 (greater than). Keep in mind that doing this requires your exchange rate tables to be sorted chronologically.

How can I handle errors if the currency or date is not found?

You can wrap your entire lookup formula inside an IFERROR function, such as =IFERROR(your_formula, "Rate Not Found"). This will display a clean, custom text message instead of an ugly #N/A error.

Can I use VLOOKUP instead of INDEX and MATCH for this scenario?

Yes, but it requires nesting multiple VLOOKUPs inside an IF function. INDEX and MATCH is generally preferred for this scenario because it provides more flexibility, better performance, and prevents formulas from breaking if you insert new columns.

Why is my INDEX MATCH formula returning an #N/A error?

An #N/A error usually means the exact lookup value (like the date formatting or currency spelling) does not match exactly in your source range. Check for invisible trailing spaces in your text cells and ensure both date columns share the exact same Date formatting.