I'm new to formulas but have learned quite a bit from these forums. I have arrays of Hardiness Zones for plants, which are written like this: 4a, 4b, 5a, 5b, 6a, 6b and so on. I need to put them into ranges like this "Zone 4-8". So far I have it this way:
I used this formula to get it:
There is another column named Zones, and in the linked table, I had to put a space after 9 so that it would still register as having 2 characters in the field instead of just one.
There are two problems with my outcome.
Problem 1: Some of them only have a single number in the Number Value field. So that return looks like "Zone 10-10" and I want it just to say "Zone 10". I'm trying to use a nested IF(LEN) function in there but it's not coming out right. So if the length of the Number Value field = 2, I want it only to return the contents of the Number Value field. If it's >2, I want it to do the formula above.
I tried this formula and am getting #ERROR returned:
My second problem might not be solveable but I'll ask anyway. If a plant's Hardiness zone includes 5a, 5b, 6a, 6b, 7a, 7b, I want to just say "Zone 5-7." Because it includes all the subzones of 5, 6, and 7. But sometimes it only is part of a zone, so it might be Zone 5b, 6a, 6b, 7a. In which case it would still need to say "Zone 5b-7a." Is it possible for a formula to tell when all subzones are included, to just return one digit?