Dear ExcelFunTension:
Good day! Thank you for posting to Microsoft Community. We are happy to help you.
To achieve your needs, we can use VBA or manually do this.
We would love to help you on your query about VBA code, however, our team focuses on general query, for example, installation and activation issue of Office 365 products. The situation you mentioned is related to VBA code, you can to refer to this article: Office VBA support and feedback | Microsoft Docs to go to Stack Overflow by using the VBA tag, along with any other relevant tags as there are also many experienced engineers and experts in the forums there.
Disclaimer: Microsoft provides no assurances and/or warranties, implied or otherwise, and is not responsible for the information you receive from the third-party linked sites, or any support related to technology.
If you want to manually do this, you can refer to the following steps:
Select the Column (Once one Column), click Subtotal in Data Tab:
After the above settings are completed, click OK, and you can see that a new column will appear at the front, which is the auxiliary column we need.
Then we select the auxiliary column area, pay attention to the area range, from the first row to the end of the data to be merged:
Then use the positioning condition, use the shortcut key "Ctrl+g" or the F5 key to quickly appear the positioning dialog box:
There is a Special.. option in the lower left corner of the targeting dialog box, click it and select Blanks. Click OK to return to the table, and you can see that all the null values in the positioning area in the first column are selected.
Click the Merge Cells function in the Home Tab to merge several selected blank cells at the same time.
Use the format brush function to brush the format of the auxiliary column to a column of the test number:
Select any cell in the table data, find Subtotal under the Data tab, and select Delete All in the lower left corner of the Subtotal dialog box:
At last, delete the auxiliary column.
Sincerely,
Tin | Microsoft Community Moderator