ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Multiple Reference Lookup (https://www.excelbanter.com/excel-worksheet-functions/51181-multiple-reference-lookup.html)

[email protected]

Multiple Reference Lookup
 
I'm trying to generate a little spreadsheet that will determine the
winning results for the lottery for a list of tickets. I have a
winnings rule table:

B1-5 PB
5 1 340000000
5 0 200000
4 1 10000
4 0 100
3 1 100
3 0 7
2 1 7
1 1 4
0 1 3

I also have a table of the ticket numbers, that count the match
occurances in the draw numbers. I'm having trouble figuring out how to
do a lookup and index of the various combinations defined in the table
so as to return the payout values.

e.g. 3, 1 = 100

Thanks!


Shmoo

Multiple Reference Lookup
 
Assuming the above data runs in ranges a2:10, b2:10 and c2:10
respectively, and the two parts to the ticket combination are in A13
and B13, the following formula performs the lookup:

=INDEX(C2:C10,MATCH(A13&B13,A2:A10&B2:B10,FALSE))

It is an array formula, so you will need to ctrl+alt+enter after you
type it an a cell.

Regards, Sam



All times are GMT +1. The time now is 10:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com