Count the number of rows with data in sheet "Pay Data" (starting A4) and double the amount and insert that rows in sheet "Journal" (starting A17).
Thanks
Count the number of rows with data in sheet "Pay Data" (starting A4) and double the amount and insert that rows in sheet "Journal" (starting A17).
Thanks
Last edited by Blokeman; 02-25-2015 at 09:34 PM.
Please click the * Add Reputation if this helps
If solved remember to mark Thread as solved
"I'm glad to help and this is not meant to sound smart, but either you have super-human vision to see all those controls cleared one by one with the code I posted, or your computer is really slow."
Maybe:
![]()
Sub Blokeman() Dim x As Long, y As Long x = Sheets("Pay Data").Range("A" & Rows.Count).End(3).Row - 4 y = x * 2 Sheets("Journal").Range("A17").Offset(1).Resize(y).EntireRow.Insert End Sub
Thanks John![]()
You're welcome. Glad to help out.
Hi John,
I still need your help one last time. What if there's already data in sheet"Journal"(let's say 101 rows, separated by empty row in the middle, 50 rows top and then blank row then 50 rows bottom)start in row 16. In sheet"Pay Data" count number of filled rows start at row 4. If the number of rows is 55 then it will add 5 rows on the top rows and also 5 rows at the bottom in sheet"Journal", in other word if less then delete rows and if more the add. Upload sample file.
Thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks