Below is an example spreadsheet showing what I'm trying to accomplish. In words, using a spilling type formula (because my spreadsheet is dynamic) I would like to determine if each value in the 'Items' list falls within a range in a table named 'Grouping'. If so, it will return the 'Group #' associated with the range that the 'Items' value fell within starting in cell C5. If the value doesn't fall within any of the ranges like AA1, 5, or BB in this example, the formula returns something that is not in the 'Group #' list like a "", -, or 0 value. Note that the grouping table may not have breaks in it as I show, so group #1 could be 1 - 5, group #2 be 6 - 9, etc.
Thank you in advance for your help writing a formula that can accomplish this task.
Thank you in advance for your help writing a formula that can accomplish this task.
Book1 | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | |||||||||
2 | |||||||||
3 | Desired | Grouping | |||||||
4 | Items | Result | Group # | Begin | End | ||||
5 | AA | 1 | 1 | 4 | |||||
6 | AA1 | 2 | 6 | 9 | |||||
7 | 1 | 1 | 3 | 11 | 12 | ||||
8 | 2 | 1 | |||||||
9 | 3 | 1 | |||||||
10 | 4 | 1 | |||||||
11 | 5 | ||||||||
12 | 6 | 2 | |||||||
13 | 7 | 2 | |||||||
14 | 8 | 2 | |||||||
15 | 9 | 2 | |||||||
16 | 10 | ||||||||
17 | 11 | 3 | |||||||
18 | 12 | 3 | |||||||
19 | BB | ||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E5:E7 | E5 | =SEQUENCE(COUNTA(Grouping[Begin])) |
Dynamic array formulas. |