I applaud your effort! It is inspiring to see people first work it out and then come looking to learn how to do it better. Thank you for posting.
Ideally, one would design the circuit to have a particular voltage change per degree. Say... 10mV/degree for example. By doing this, calculating the temperature from the input voltage (ADC value) is a very simple calculation - something like TEMPERATURE = (ADC_VALUE - NEGATIVE_TEMPERATURE_OFFSET) / mV_PER_DEGREE. It may be that this approach will work with your thermistor, but you would need examine the datasheet and post that information - or at least post to say which thermistor you are using so that someone here can look at that data. Of course, then you would only need to put "T" in the formula and get TEMPERATURE out for any temperature value.
Another approach, presuming you have no datasheet perhaps, is to do something similar yourself. For example: If, when T is between 60 and 102, the temperature is always T/2 - 32 and when T is between 103 and 196, the temperature is T/3 - 10, then it is possible to use far fewer IF/ THEN statements and still get accurate results. You will only need to determine which range T falls in and then (like above) apply the formula to your value to retrieve the correct temperature.
The last method in common practice is that which you've chosen - a "lookup" method, where the sensor value is read, then substituted with the correct temperature. PicBasic has a function to do this: LOOKUP:
LOOKUP Index,[Constant{,Constant...}], Var 'From the manual
In your case, it might look like: LOOKUP T-26 [-20,-20,-19,-19...] TEMPERATURE. Lookups like this can be very useful for translating unrelated data to appropriate output, but are tedious and memory intensive to use, so typically are to be avoided or at least abbreviated if at all possible. You might, for example, use a combination of the previous method and this one - using different, shorter, lookups to determine temperature from a formula result that provides fewer data points. If there is no way to reduce the number of data points, then perhaps you can reduce the amount of program memory used by storing the T value in EEPROM and then reading the temperature back from an offset position As:
DATA @ 0, 26, 27, 28...
DATA @ 100, -20, -20, -19...
So that you READ one value to find T, then add an offset to READ the temperature.
In PicBasic... in electronics... there are always several means to get to the same goal. The opportunity to follow your own path is the benefit of not just buying a thermometer and being done.
Bookmarks