View Single Post
 
Old 02-18-2020, 10:46 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,344
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Perhaps:
Code:
Sub TblHiLite()
Application.ScreenUpdating = False
Dim r As Long, h As Long, StrTitle As String
With Selection.Tables(1)
  StrTitle = Split(.Cell(2, 1).Range.Text, vbCr)(0)
  .Rows(2).Shading.BackgroundPatternColorIndex = 0
  h = 0
  For r = 3 To .Rows.Count
    If Split(.Cell(r, 1).Range.Text, vbCr)(0) <> StrTitle Then
      If h = 0 Then h = 3 Else h = 0
      StrTitle = Split(.Cell(r, 1).Range.Text, vbCr)(0)
    End If
    .Rows(r).Shading.BackgroundPatternColorIndex = h
  Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote