robertmwaring2
Board Regular
- Joined
- Mar 8, 2019
- Messages
- 132
- Office Version
- 365
- Platform
- Windows
Hello All,
I appologize in advance that I am COMPLETELY NEW to VBA - with no real knowledge. I just finished creating a spreadsheet (sheet name is "Production Sheet") that i am in the process of creating a userform for. I had everything formatted as I liked, but came across an issue when the sheet was more than 1 page long. I formatted everything up to 10 pages, but I may not need to print 10 pages, only those with information. I am trying to format each row (beginning with A8) ending at Column J. I need each cell in each row to have a border if there is information in Column A of that row.
Example: If A8<>"", each cell from A8:J8 has a border (just basic default border). There could be times when only 5 rows will be used (A8:J12) but times when 50 may be used (A8:J57) or more. If it is not used, it should remain blank.
I am also trying to center information across a selection in two separate area within each row. For example, the information that will be put into A8, should be centered across A8:D8 and the information in G8 should be centered across G8:I8. I need the same principles to apply to all rows 8 and beyond (for border and centering).
I have tried to figure this count via MANY forums but cannot mix and match what I need to accomplish it without errors if it works a all. If anyone can help, I would greatly appreciate it.
I appologize in advance that I am COMPLETELY NEW to VBA - with no real knowledge. I just finished creating a spreadsheet (sheet name is "Production Sheet") that i am in the process of creating a userform for. I had everything formatted as I liked, but came across an issue when the sheet was more than 1 page long. I formatted everything up to 10 pages, but I may not need to print 10 pages, only those with information. I am trying to format each row (beginning with A8) ending at Column J. I need each cell in each row to have a border if there is information in Column A of that row.
Example: If A8<>"", each cell from A8:J8 has a border (just basic default border). There could be times when only 5 rows will be used (A8:J12) but times when 50 may be used (A8:J57) or more. If it is not used, it should remain blank.
I am also trying to center information across a selection in two separate area within each row. For example, the information that will be put into A8, should be centered across A8:D8 and the information in G8 should be centered across G8:I8. I need the same principles to apply to all rows 8 and beyond (for border and centering).
I have tried to figure this count via MANY forums but cannot mix and match what I need to accomplish it without errors if it works a all. If anyone can help, I would greatly appreciate it.