I am comparing 2 sets of account balances and want to find the account with the largest change in balance from day to day for a specific product category (Personal Accounts) and location (10). The accounts are separated into groups by a product code and location ID. Below is a data sample.
Sample Balance Data
<tbody>
</tbody>
Criteria
<tbody>
</tbody>
The answer should return 500.00 for location 10 and 1000.00 for location 20. I have tried the formula:
and some other combinations of this formula, but it fails to recognize the list of possible product codes in the criteria table. If I set the formula for just one product code such as ...product = "10".. then it returns a value, but not if I try to use the "product codes" list.
Any ideas on what I can do? How can I make sure to include negative changes as well?
Sample Balance Data
Account # | Product | Location | Day 1 Balance | Day 2 Balance | Change |
12345 | 10 | 10 | 1000.00 | 1500.00 | 500.00 |
67890 | 30 | 10 | 50.00 | 300.00 | 250.00 |
44558 | 20 | 10 | 1000.00 | 900.00 | (100.00) |
79135 | 10 | 20 | 1000.00 | 2000.00 | 1000.00 |
<tbody>
</tbody>
Criteria
Product name | Product Codes | Location ID |
Personal Accounts | 10 | 10 |
Personal Accounts | 20 | 10 |
<tbody>
</tbody>
The answer should return 500.00 for location 10 and 1000.00 for location 20. I have tried the formula:
Code:
{=index(account #,max(if((location = location id)*(product = product codes), row(change)))}
and some other combinations of this formula, but it fails to recognize the list of possible product codes in the criteria table. If I set the formula for just one product code such as ...product = "10".. then it returns a value, but not if I try to use the "product codes" list.
Any ideas on what I can do? How can I make sure to include negative changes as well?