carlsonleahm
New Member
- Joined
- Aug 19, 2024
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
Looking for some VBA code! Each day, I run reports, then I manually select the columns I want so that I can set my print area and print to PDF. I'm looking for some VBA code that can identify the columns that have data in them so that I do not have to manually select the columns. The catch is that the number of columns changes depending on the time period of the report as there is a column for each month in the report.
How can I identify all columns that have data in row 2 and then select those columns? In the example below, I would want columns A:F selected.
How can I identify all columns that have data in row 2 and then select those columns? In the example below, I would want columns A:F selected.