Thread
:
Insert 3 blank rows wherever the date changes in column????
View Single Post
#
2
Posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
Posts: 10,124
Insert 3 blank rows wherever the date changes in column????
Should do it. Change mc to suit
Sub insertrowsatdatechnage()
mc = "a"
For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1
If Cells(i - 1, mc) < Cells(i, mc) Then Rows(i).Resize(3).Insert
Next
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"malycom" wrote in message
...
Hi
I have a worksheet of various transactions sorted in date order. There
may
be 1 row of data for a specific date if there was only one transaction and
another date may have 40 rows of data as there were 40 transactions.
This is for a complete month so approx 30 days
What I would like to do is to run a macro or something that will search
down
the date column and insert 3 blank rows at every row where the date
changes,
ie 01/04/2009 changes to 02/04/2009 and then again when that changes to
03/04/2009 and do this for the whole month on the worksheet.
I would be grateful if you can give a detailed explanation as to how to do
this if it is possible as I have absolutely no idea.
Thanks in advance
Malcolm
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett