VLOOKUP Multiple Criteria Including Date Range
I've got a table of values that contains titles of payments, the dates they are valid between and the amount they are.
I am attempting to find the amount the payment is for a particular month in a separate table.
Examples of the two tables are shown below.
Table 1
| Name | Date from | Date to | Amount |
|---|---|---|---|
| Gym Membership | 06/07/2013 | 06/06/2014 | £50 |
| Gym Membership | 06/07/2014 | 06/06/2015 | £60 |
| Insurance | 01/08/2013 | 01/07/2014 | £100 |
| Insurance | 01/08/2014 | 01/07/2015 | £110 |
Table 2
| Month | Insurance | Gym Membership |
|---|---|---|
| June 2014 | ||
| July 2014 | ||
| August 2014 |
Now I am attempting a lookup that, in "Table 2" cell "B2", will find, in "Table 1" the Payment that has the matching name to the column title ("B1"), and the month in Table 2 is valid within the Payment Dates. So "Table 1" column "A" must match the value in "Table 2" "B1" and the date in "Table 2" "A2" must be between the dates in "Table 1" column "B" and "Table 1" column "C".
With the formulas working correctly, the values in Table 2 should show as:
Table 2
| Month | Insurance | Gym Membership |
|---|---|---|
| June 2014 | £100 | £50 |
| July 2014 | £100 | £60 |
| August 2014 | £110 | £60 |
I assume I would require a VLOOKUP to find the Payment Name in Table 1, but then some additional criteria to check the dates.
MacBook Pro (13-inch Mid 2012), OS X Mavericks (10.9.4), Numbers for Mac