Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Kerri Gonzalez   on Oct 27 In MS Office Category.

  
Question Answered By: Adelbert Fischer   on Oct 27

I forgot you wanted the rows  to have a "Quarter To Date" heading instead
of "Current Period" when finished. This modified version of my earlier
suggestion will do that, too.

Sub Macro1()
Dim MT As Integer
Range("H3:M3").Select
Selection.Delete Shift:=xlUp
Range("B4").Activate
MT = 0
Do While MT < 10
If ActiveCell.Value = "Quarter To Date" Then
ActiveCell.EntireRow.Delete
MT = 0
ActiveCell.Offset(-1, 0).Activate
ElseIf Len(ActiveCell.Value) = 0 Then
ActiveCell.EntireRow.ClearContents
MT = MT + 1
End If
ActiveCell.Offset(1, 0).Activate
Loop
Columns("B:B").Select
Selection.Replace What:="Current Period", Replacement:="Quarter To Date", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=
_
False, ReplaceFormat:=False
Range("A1").Select
End Sub

Share: 

 

This Question has 10 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Delete Part of Row and move next Row Down Up Or get search suggestion and latest updates.


Tagged: