Forum Discussion
Index Match Match - wrong value returned
- May 25, 2019
Your problem was that your range of menu lookup and your definition to Table1 did not correspond. Once you have defined a table any names you need for validation or to identify parts of the table can be defined in terms of the structured references.
I have used 'AvailableSize' both for validation and in the formula
= INDEX( DrinksPrices,
MATCH( Drink, Menu, 0 ),
MATCH( Size, AvailableSize, 0 )+1 )
where 'AvailableSize' is defined as part of the header row.
= DrinksPrices[[#Headers],[TALL]:[VENTI]]
Similarly 'Menu', which refers to the data field,
= DrinksPrices[CLASSICS/FAVOURITES]
is used for both purposes.
The table 'DrinksPrices' refers to the data only and does not include the header row nor any totals row.
Your problem was that your range of menu lookup and your definition to Table1 did not correspond. Once you have defined a table any names you need for validation or to identify parts of the table can be defined in terms of the structured references.
I have used 'AvailableSize' both for validation and in the formula
= INDEX( DrinksPrices,
MATCH( Drink, Menu, 0 ),
MATCH( Size, AvailableSize, 0 )+1 )
where 'AvailableSize' is defined as part of the header row.
= DrinksPrices[[#Headers],[TALL]:[VENTI]]
Similarly 'Menu', which refers to the data field,
= DrinksPrices[CLASSICS/FAVOURITES]
is used for both purposes.
The table 'DrinksPrices' refers to the data only and does not include the header row nor any totals row.
- AVP68May 25, 2019Copper Contributor
PeterBartholomew1Thanks, learned something new here.