Hello, I have a PowerPoint with a lot of data tables (one per slide), some of which have total columns that I would like to bold to differentiate from the other columns. I was able to do so using the below code that finds columns with "Total" in them and bolds them, but there are also some tables with total rows (i.e., "Total" in the first column), so it bolds those columns too, which I do not want. How do I make it so this only works for total columns (i.e., "Total" in the first row)?
Sub Find_Change()
Dim otbl As Table
Dim R As Long
Dim C As Long
Dim osld As Slide
Dim oshp As Shape
Const target_Word As String = "Total"
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.HasTable Then
Set otbl = oshp.Table
For R = 1 To otbl.Rows.Count
For C = 1 To otbl.Columns.Count
If InStr(UCase(otbl.Cell(R, C).Shape.TextFrame2.TextRange.Text), UCase(target_Word)) > 0 Then Call boldcol(C, otbl)
Next C
Next R
End If
Next oshp
Next osld
End Sub
Sub boldcol(lngC As Long, otbl As Table)
Dim R As Long
For R = 1 To otbl.Rows.Count
With otbl.Cell(R, lngC).Shape.TextFrame2.TextRange.Font
.Bold = True
End With
Next
End Sub