range switching problem in auto range multimeter using PIC microcontroller
Some possibilities:

Present the input signal with different scales to different A/D inputs.  Range switching is then done in software.  Roughly you want to use the signal with the highest reading that isn't clipped.  In reality it is good to blend over at least part of the range with the next lower signal so that you have smooth overlap between the ranges.  Calibration needs to be done carefully.

Use a adjustable attenuator chain.  Sometimes this is done with relays due to the need to handle large voltages.  Again, calibration between the different ranges is important.  Some hysterisis is needed to prevent constantly switching if the signal happens to be right at a transition between scales.

Use a very high resolution A/D with fixed attenuation.  This is probably the simplest if you don't need really high input voltage.  Delta-sigma A/Ds that can produce over 20 bits are available.  They are too slow for many uses, ususally a few 10s of ms, but are still instantaneous on a human scale.  For example, if your meter is supposed to work for &plusmn;30V, then 20 bits gives you 60 &micro;V resolution.