I have a spreadsheet that has several dates the same. i want to insert a full
row after each
occurrence (by calling a subroutine). The range is B1 to B500 and I
succesfully find the first occurrence , 'insertarowbelow' (sub) and set the
activecell (part of insertarow below sub) to the next cell in B. But whatever
loop I use it just seems to start again from B1 - ie just getting one added row
below the first date. Any ideas?
Public Sub FINDdate()
Dim egg As Date
egg = "26/7/2007"
Do (?)
Range("b1:b500").Find(What:=egg, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False
_
, SearchFormat:=False).Activate
Call insertarowbelow
Loop (?)
--------------------------------------------------------------------------------\
--------------------------------------------
Public Sub insertarowbelow()
ActiveCell.Offset(0, -1).Select
Selection.EntireRow.Insert
ActiveCell.Offset(1, 1).Select
End Sub