added detection of range formatting errors