View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default How to count number of Cell have Strike Through Effect & Bold as f

guess they just wanted the solution!

--


Gary


"NickHK" wrote in message
...
"Akash"
egroups.com...
On Jun 27, 6:44 pm, "Gary Keramidas" <GKeramidasATmsn.com wrote:
mike:

i just point this out because i've seen so many posts from the pros about
not
having to select cells most of the time, and so i don't.
you can also do this without selecting anything. not criticizing you, i see
you
help a lot of people

like i mentioned, just point this out.(promise i won't do it again<g)

Sub stantial()
Dim myRange As Range
Set myRange = Range("a1:c10") '< Alter to suit
For Each c In myRange

If c.Font.Strikethrough = True Then
strike = strike + 1
ElseIf c.Font.Bold = True Then Bold = Bold + 1
End If
Next
MsgBox (strike & " Strikethrough cells " & Bold & " Bold cells")

End Sub
--

Gary

"Mike H" wrote in message

...

Try this, it works on the active worksheet

Sub stantial()
Dim myRange As Range
Set myRange = Range("a1:c10") '< Alter to suit
For Each c In myRange
c.Select
If Selection.Font.Strikethrough = True Then
strike = strike + 1
ElseIf Selection.Font.Bold = True Then Bold = Bold + 1
End If
Next
MsgBox (strike & " Strikethrough cells " & Bold & " Bold cells")

End Sub

Mike

"Akash" wrote:

Hi,

I have data in Column D:BG

Mostly Cell have Strike Through Effect & Bold as font style.

How can we count those cells which are having strike Through Effect in
it.
How can we count those cells which are having Bold Font Style in It.

Awaiting for your reply.

Thanks

Akash Maheshwari


Hi,

Thanks for the help but I have not yet received any solution for my
querry. i think u have not got my point. Let me explain you more
precisely.

Column A is to count no of cells with Bolds. (so formula is required)
Column B is to count no of cells with Red Strike Through Effect (so
formula is required)

I have data in Column E5 : BH5

So cell A5 would count no of cells with bold fonts in cell E5 : BH5
And cell B5 would count no of cells with Red Strike Through Effect in
cell E5 : BH5

Awaiting for you mail.

Thanks

Akash Maheshwari



And the replies you have received give you no ideas ?

NickHK