It will recall the previous action you performed in the previous action.
Now you need not to do the merge for all the remaining years rather, you can just select one more year and press the F4 function key. Now, look at the year on Target vs the Actual report. Now press the shortcut key ALT + H + M + M. In this case, I want to merge YEAR main heading from cell B1 to E1. Select the number of cells you want to merge.