Here is a VBA solution. Using macros for something that can be done with worksheet formulas isn't the best practice, However, it gives you the functionality you want. Create a module in your workbook and add this code to the module. Don't forget to save your file as .xlsm
Function SOMEFORMULA(item As Variant, month As Variant) Dim rng As Range 'set your lookup range Set rng = Worksheets("Sheet1").Range("A1:F4") SOMEFORMULA = Application.WorksheetFunction.Index(rng, WorksheetFunction.Match(item, WorksheetFunction.Index(rng, 0, 1), 0), WorksheetFunction.Match(month, WorksheetFunction.Index(rng, 1, 0), 0)) End Function
My recommendation is to use a named range for your data array, such that this line:
Set rng = Worksheets("Sheet1").Range("A1:F4")
Becomes:
Set rng = Worksheets("Sheet1").Range("named_range")
And can be edited from the workbook.
You might also want to change the formulate name from "SOMEFORMULA()" to something smaller/ more appropriate.
The results are as follows: