#  Other Applications & Softwares  > PowerPoint Formatting & General >  >  Highlight negative numbers in PPT (Text box)

## hvsuhas

Hi Everyone,
I have written a code where it highlights the text (Negative numbers) as per the Input Box. But my code is highlighting the whole text box but i need to highlight only 1 line irrespective of length of 1 line. 
For Example :
Line1: -100$ product
Line2: +200$ product
Line3: +300$ product
Line4: -200$ product
In this case i need to highlight the Line 1&4. Can anyone please help me in solving that? Below is the code.

#Sub redcolor1()
Dim SlideNo As Slide, AllShape As Shape, RowCnt As Integer, ColCnt As Integer
Dim nega As String
nega = InputBox("Input the sign of negative no's to be formatted [- or (]")
For Each SlideNo In ActivePresentation.Slides
For Each AllShape In SlideNo.Shapes
If AllShape.Type = msoTextBox Then
'For RowCnt = 1 To AllShape.Table.Rows.Count
'For ColCnt = 1 To AllShape.Table.Columns.Count
'AllShape.Table.Cell(RowCnt, ColCnt).Shape.TextFrame.TextRange.Font.Name = "Corbel"
'AllShape.Table.Cell(RowCnt, ColCnt).Shape.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter
'AllShape.Table.Cell(RowCnt, ColCnt).Shape.TextFrame.VerticalAnchor = msoAnchorMiddle
If Left(AllShape.TextFrame.TextRange, 1) = nega Then
AllShape.TextFrame.TextRange.Font.Color.RGB = RGB(255, 0, 0)
End If
'Next ColCnt
'Next RowCnt
End If
Next AllShape
Next SlideNo
End Sub#

----------


## alansidman

Welcome to the Forum, unfortunately this is a duplicate post and as such will now be closed, you may continue in your other thread.

Thread Closed.

----------

