Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
I need to insert 'x" number of rows above row(t)
How would I code this?
Here is my code so far ...
Hope I was able to explain myself OK.
How would I code this?
Here is my code so far ...
Rich (BB code):
fnlrow = Application.Match("Please use reverse for comments.", .Range("A:A")) + 1 'the final row of the report
add_rows = 52 - fnlrow 'the number of blank rows needing insertion to fill up the page
fmacnt = Application.CountA(.Range("C" & bmk + 3 & ":C" & fnlrow - 1)) + 2 'how many rows in the bottom grid
If fmacnt < 10 Then 'the bottom grid must be a minimum 10 rows.
fma_rows = 10 - fmacnt 'the number of empty rows to be inserted to bring the row count to 10 in the lower gridt
'insert fma_rows above the last row of the lower grid = fnlrow-1
Else
Hope I was able to explain myself OK.