Forum Discussion
Store a range of numbers in one cell? Excel Question
As noted by the other responses more information and in particular a sample sheet would be helpful.
That said, you are correct that excel can NOT store a range of numbers in a single cell as values and putting a list or range of values into a single cell will cause it to be treated as text. That said it doesn't mean what you want to do isn't possible. There are many ways to treat text and to extract numbers from text or just search the text. Alternatively you say 1 or 2 cells and it sounds like it is a range of values (i.e. continuous) so could you just have min and max columns for the range and then return the rows that have a min < the value and the max > the value. Again this would be easier to show if we have a sample sheet. But it sounds like a FILTER() might work well for you. Here is a formula in 'pseudo code' to return the "data" of interest based on the corresponding [min] and [max] columns bracketing the "value" of interest
=FILTER( data, (data[min] < value)*(data[max] > value), "none found")
Hey m_tarler,
Thank you for this response. From what I understand, when instructing excel to pull up different crops based on the temperature zones or hardiness zones, we utilize the max < the value. In doing so, Excel will look for every crop, with temperature, or hardiness zone, below the the value. Is this correct?
I'll go ahead an attempt to rearrange my worksheet with MIN and MAX columns. As for the worksheet, I've attached it here. Please let me know what you think. Thank you for your time.
https://docs.google.com/spreadsheets/d/1shn8arKSoY9nkuGF7cDEFMiy8rnOWc4d/edit?usp=drive_link&ouid=113669357501570955749&rtpof=true&sd=true
- m_tarlerDec 19, 2024Bronze Contributor
you could use the max min i suggested but that was more for something like 'I live in area with a temperature of X so find all zones that include that temperature'
In this case it appears you already have hardiness zone and want all crops that include that zone so my above formula should work. I updated it based on your sheet info:
=TEXTJOIN(", ",,FILTER( USDA_Crops5[Crop], ISNUMBER(SEARCH([@[Hrdiness Zone 2023]]&",", USDA_Crops5[Hardiness Zones]&",")), "None"))
But note the list of crops is large so those cells got big. i hope this is what you are looking for.