Use IF with INDEX MATCH to Return Forecast or Actual Values in Excel
Question details
Create a formula that returns adjusted forecast data or a Budget or Actual value based on a row's label.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains a row label and lookup key, while forecast data is on the Meterage sheet and Budget or Actual data is on the Master sheet.
- Observed behavior
- For a Forecast row, the formula should sum matching forecast values and apply a multiplier; otherwise, it should return the matching value from Master.
Check that A2 contains the lookup key and G2 contains the row label. Confirm that Meterage has keys in column A and forecast values in H:J, and that Master has keys in column A and the required Budget or Actual values in column AD.
Use IF with separate INDEX MATCH lookups
Use this formula when Forecast rows need an adjusted sum and all other rows should return a value from Master.
The Forecast branch finds the key in Meterage column A, sums the matching row across H:J, and multiplies the result by 0.9341. The other branch finds the key in Master column A and returns its value from column AD.
On the worksheet containing the key and label, click the cell where you want the result for row 2.
In the formula bar, enter =IF(G2="Forecast",SUM(INDEX(Meterage!H:J,MATCH(A2,Meterage!A:A,0),0))*0.9341,INDEX(Master!AD:AD,MATCH(A2,Master!A:A,0))) and press Enter.
Edit the cell references, sheet names, source columns, or multiplier in the formula bar to match your workbook. Then drag the cell's fill handle down to apply the formula to other rows.

Calculate forecast or actual values in WPS Spreadsheets
Open your workbook in WPS Spreadsheets and use the same IF, INDEX, and MATCH formula to retrieve values from the Meterage and Master sheets.
- 1. Open the workbook: Open WPS Spreadsheets and select Open to choose the workbook containing the Meterage and Master sheets.
- 2. Select a result cell: On the sheet with the lookup key in A2 and label in G2, click the result cell for row 2.
- 3. Enter the formula: In the formula bar, enter =IF(G2="Forecast",SUM(INDEX(Meterage!H:J,MATCH(A2,Meterage!A:A,0),0))*0.9341,INDEX(Master!AD:AD,MATCH(A2,Master!A:A,0))) and press Enter.
- 4. Apply it to other rows: Adjust the references and multiplier if needed, then drag the result cell's fill handle down and use File > Save to save the workbook.

Frequently Asked Questions
How does the formula choose between forecast and actual data?
IF checks G2 for the text Forecast. If it matches, the formula uses Meterage; otherwise, it returns the matching value from Master column AD.
Why does the forecast branch use SUM?
INDEX returns the matching row across Meterage columns H:J when its column argument is 0. SUM adds those values before the formula applies the multiplier.
What does #N/A mean in this formula?
It generally means MATCH could not find the key from A2 in column A of the selected source sheet. Check that the key exists and that its formatting matches the source data.
What happens if a lookup key appears more than once?
MATCH with 0 returns the position of the first exact match, so the formula uses the first matching row on the selected source sheet.




