Switch between 2 voltage dividers depending on input voltage
You could use a 4053 multiplexer with a comparator and voltage reference for selecting. Be sure to carefully analyze this idea to see if it makes sense in all possible situations. The reference has to work from the lowest possible voltage with one cell, so you'll have to divide the battery voltage down. 

A better solution might be to add a couple of jumper blocks or a DIP switch to change from 1 to two cells. You could use a single chain of 5 resistors.