A data merging program causes a computer to perform a step of selecting a
first cell as a starting point of merging; a step of comparing a first
numerical value, which is recorded in the first cell, with a preset
reference value; a step of, if the first numerical value is smaller than
the reference value, calculating a total value of the first numerical
value and a second numerical value recorded in a second cell adjacent to
the first cell in the same column; a step of comparing the total value
with the reference value and, if the total value is smaller than the
reference value, setting a third cell into which the first and second
cells are merged and recording the total value in the third cell; and a
step of selecting the third cell as a new starting point of merging.