def get_range(col_index)
      col_num = col_index + 1

      old_range = self.locate_range(col_index)

      if old_range.nil? then
        new_range = RubyXL::ColumnRange.new
      else
        if old_range.min == col_num && old_range.max == col_num then
          return old_range # Single column range, OK to change in place
        elsif old_range.min == col_num then
          new_range = old_range.dup
          old_range.min += 1
        elsif old_range.max == col_num then
          new_range = old_range.dup
          old_range.max -= 1
        else
          range_before = old_range.dup
          range_before.max = col_index # col_num - 1
          self << range_before

          old_range.min = col_num + 1

          new_range = RubyXL::ColumnRange.new
        end
      end

      new_range.min = new_range.max = col_num
      self << new_range
      return new_range
    end
def get_range(col_index)
      col_num = col_index + 1

      old_range = self.locate_range(col_index)

      if old_range.nil? then
        new_range = RubyXL::ColumnRange.new
      else
        if old_range.min == col_num && old_range.max == col_num then
          return old_range # Single column range, OK to change in place
        elsif old_range.min == col_num then
          new_range = old_range.dup
          old_range.min += 1
        elsif old_range.max == col_num then
          new_range = old_range.dup
          old_range.max -= 1
        else
          range_before = old_range.dup
          range_before.max = col_index # col_num - 1
          self << range_before

          old_range.min = col_num + 1

          new_range = RubyXL::ColumnRange.new
        end
      end

      new_range.min = new_range.max = col_num
      self << new_range
      return new_range
    end
Locate an existing column range, make a new one if not found,
 or split existing column range into multiples.