Eloise T
Active Member
I need a line of code that makes Column H non-boldface Except any cell in Column H that begins with "NO INVOICE..." which is to remain BOLDFACE.
Thank you in advance.
Thank you in advance.
Code:
' This VBA segment changes the currency in Column H from whatever the format happens to be to "$#,##0"
Sub CurrencyFix()
' Affects only <Column H> "Amount"
Dim lRow As Long, iColumn As Integer, lRowest As Long
Dim ws As Worksheet
' start 1Row starts at row 3, iColumn starts at column H(8) H is the 8th column alphabetically.
lRow = 3
iColumn = 8
' process
With ws
lRowest = .Cells(.Rows.Count, iColumn).End(xlUp).Row
Do While lRow <= lRowest
' Debug.Print lRow
With .Cells(lRow, iColumn)
If .NumberFormat <> "$#,##0" Then .NumberFormat = "$#,##0"
' At some point here or close to here I need a line of code
' that makes Column H non-boldface Except any cell in
' Column H that begins with "NO INVOICE..." which is to
' remain BOLDFACE.
.Font.Bold = False
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
lRow = lRow + 1
End With
Loop
End With
End Sub