I assume that the first row in your worksheet is a PDF File Header.
Here is another macro solution for you to consider that will not loop in each of the rows in the raw data.
| A |
---|
PDF File Header | |
Page X of Y | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Not this Page X of Y | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Page 1 of 2 | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Not this Page X of Y | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Page 7 of 11 | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
<colgroup><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]3[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]4[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]5[/TD]
[TD="align: center"]8[/TD]
[TD="align: right"]6[/TD]
[TD="align: center"]9[/TD]
[TD="align: right"]7[/TD]
[TD="align: center"]10[/TD]
[TD="align: right"]8[/TD]
[TD="align: center"]11[/TD]
[TD="align: right"]9[/TD]
[TD="align: center"]12[/TD]
[TD="align: right"]10[/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]14[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]15[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]16[/TD]
[TD="align: right"]3[/TD]
[TD="align: center"]17[/TD]
[TD="align: right"]4[/TD]
[TD="align: center"]18[/TD]
[TD="align: right"]5[/TD]
[TD="align: center"]19[/TD]
[TD="align: right"]6[/TD]
[TD="align: center"]20[/TD]
[TD="align: right"]7[/TD]
[TD="align: center"]21[/TD]
[TD="align: right"]8[/TD]
[TD="align: center"]22[/TD]
[TD="align: right"]9[/TD]
[TD="align: center"]23[/TD]
[TD="align: right"]10[/TD]
[TD="align: center"]24[/TD]
[TD="align: center"]25[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]26[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]27[/TD]
[TD="align: right"]3[/TD]
[TD="align: center"]28[/TD]
[TD="align: right"]4[/TD]
[TD="align: center"]29[/TD]
[TD="align: right"]5[/TD]
[TD="align: center"]30[/TD]
[TD="align: right"]6[/TD]
[TD="align: center"]31[/TD]
[TD="align: right"]7[/TD]
[TD="align: center"]32[/TD]
[TD="align: right"]8[/TD]
[TD="align: center"]33[/TD]
[TD="align: right"]9[/TD]
[TD="align: center"]34[/TD]
[TD="align: right"]10[/TD]
[TD="align: center"]35[/TD]
[TD="align: center"]36[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]37[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]38[/TD]
[TD="align: right"]3[/TD]
[TD="align: center"]39[/TD]
[TD="align: right"]4[/TD]
[TD="align: center"]40[/TD]
[TD="align: right"]5[/TD]
[TD="align: center"]41[/TD]
[TD="align: right"]6[/TD]
[TD="align: center"]42[/TD]
[TD="align: right"]7[/TD]
[TD="align: center"]43[/TD]
[TD="align: right"]8[/TD]
[TD="align: center"]44[/TD]
[TD="align: right"]9[/TD]
[TD="align: center"]45[/TD]
[TD="align: right"]10[/TD]
[TD="align: center"]46[/TD]
[TD="align: center"]47[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]48[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]49[/TD]
[TD="align: right"]3[/TD]
[TD="align: center"]50[/TD]
[TD="align: right"]4[/TD]
[TD="align: center"]51[/TD]
[TD="align: right"]5[/TD]
[TD="align: center"]52[/TD]
[TD="align: right"]6[/TD]
[TD="align: center"]53[/TD]
[TD="align: right"]7[/TD]
[TD="align: center"]54[/TD]
[TD="align: right"]8[/TD]
[TD="align: center"]55[/TD]
[TD="align: right"]9[/TD]
[TD="align: center"]56[/TD]
[TD="align: right"]10[/TD]
[TD="align: center"]57[/TD]
[TD="align: right"][/TD]
</tbody>
| A |
---|
PDF File Header | |
Not this Page X of Y | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Not this Page X of Y | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
<colgroup><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]3[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]4[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]5[/TD]
[TD="align: center"]8[/TD]
[TD="align: right"]6[/TD]
[TD="align: center"]9[/TD]
[TD="align: right"]7[/TD]
[TD="align: center"]10[/TD]
[TD="align: right"]8[/TD]
[TD="align: center"]11[/TD]
[TD="align: right"]9[/TD]
[TD="align: center"]12[/TD]
[TD="align: right"]10[/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]14[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]15[/TD]
[TD="align: right"]2[/TD]
[TD="align: center"]16[/TD]
[TD="align: right"]3[/TD]
[TD="align: center"]17[/TD]
[TD="align: right"]4[/TD]
[TD="align: center"]18[/TD]
[TD="align: right"]5[/TD]
[TD="align: center"]19[/TD]
[TD="align: right"]6[/TD]
[TD="align: center"]20[/TD]
[TD="align: right"]7[/TD]
[TD="align: center"]21[/TD]
[TD="align: right"]8[/TD]
[TD="align: center"]22[/TD]
[TD="align: right"]9[/TD]
[TD="align: center"]23[/TD]
[TD="align: right"]10[/TD]
[TD="align: center"]24[/TD]
[TD="align: right"][/TD]
</tbody>
, and, answer the "do you want to enable macros" question as "yes" or "OK" (depending on the button label for your version of Excel) the next time you open your workbook.