Do I need a macro?

  • Thread starter Thread starter BIG-T
  • Start date Start date
B

BIG-T

Simplified example of what I'm trying to do:

I have a row (A1:Z1) of cells each containing text data.
Some of the cells of text are formatted differently i.e.
the text is in bold and italics. I want a total count in
cell AA1 of all of the cells in A1:Z1 that contain text
that has been set to bold and italics.

Do I need a macro?
 
Yes, you need a macro

Sub countbolditalic()
mysum = 0
For Each c In Range("a1:z1")
If c.Font.Bold = True And c.Font.Italic = True Then _
mysum = mysum + 1
Next
MsgBox mysum
End Sub
 
Back
Top