View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Charles Chickering Charles Chickering is offline
external usenet poster
 
Posts: 272
Default Adding empty row with code

Hi try this:
Dim r As Range
Set r = Columns("I").Find(What:="No Match, _
After:=Range("I1"), LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious, MatchCase:=True)
If Not r Is Nothing Then r.Offset(1).EntireRow.Insert
--
Charles Chickering

"A good example is twice the value of good advice."


"SITCFanTN" wrote:

I would like to add an empty row in my sheet based on the last entry in
column I that says "No Match". I'm sorting based on Col I so all the "No
Matches" display first, then all the "Matches". Is there a way to use code
to look at the text in Col I and add and empy row based on the last text
entry of "No Match". I've searched previous posts with no luck. Thanks for
your help.