Hi there,
I am working with a project where I need to lookup a value based on cell value in my data (a postal code, i.e. A0A 1A9), versus a lookup list that is organized by postal code ranges.
Example, the value I am searching for is A0A 1A8 (assume this is in cell A1).
My lookup table is organized as:
[TABLE="width: 500, align: center"]
A0A1A0
A0A1A9
CODE A
A0A1B0
A0A1B9
CODE B
A0A1C0
A0A1E9
CODE C
[/TABLE]
What I am after is being able to return the value in the 3rd column (i.e. "Code A").
The code would need to understand that A0A1A8 falls within the range of (A0A1A0 to A0A1A9), and thus "CODE A" is the return value.
As a second example, if I were to lookup "A0A1D3", the code would need to understand that it falls within the range (A0A1C0 to A0A1E9) because "D" comes before "E" alphabetically and this falls in this range.
Note, the scope of the range is variable as you can see by the 3rd row in my "lookup table" as it spans across 2 alpha in the 5th character slot.
Thanks all!