#1   Report Post  
macamarr
 
Posts: n/a
Default count if

I am counting text. Not having a problem getting a count but what I need to
do is; if the given words font has a strikthrough format I do not want to
include it in the count.
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Then you need a UDF to identify that the text has a strikethrough and put
this in a helper column, and count in that column, There is no function to
get it directly.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"macamarr" wrote in message
...
I am counting text. Not having a problem getting a count but what I need

to
do is; if the given words font has a strikthrough format I do not want to
include it in the count.



  #3   Report Post  
Jim May
 
Posts: n/a
Default

In your Worksheet code module paste in:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Font.Strikethrough = True Then
Target.Font.Strikethrough = False
Else: Target.Font.Strikethrough = True
End If
Target.Calculate
Cancel = True
End Sub

In a Standard module paste in:

Function CountAnyOpen(myRange)
Application.Volatile
For Each i In myRange
If i.Cells.Font.Strikethrough = False Then
mytotal = 1 + mytotal
End If
Next i
CountAnyOpen = mytotal
End Function

then on your sheet (in an empty cell enter =CountAnyOpen(A1:A10) <Change
accordingly - and format

Double-click away (between A1 and A10)
HTH




"Bob Phillips" wrote in message
...
Then you need a UDF to identify that the text has a strikethrough and put
this in a helper column, and count in that column, There is no function to
get it directly.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"macamarr" wrote in message
...
I am counting text. Not having a problem getting a count but what I need

to
do is; if the given words font has a strikthrough format I do not want

to
include it in the count.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUMPRODUCT Formula to Count Row of data Below Matched Criteria Sam via OfficeKB.com Excel Worksheet Functions 8 February 3rd 05 01:37 AM
count a group of numbers but do not count duplicates Lisaml Excel Worksheet Functions 2 January 26th 05 11:19 PM
Count number to reach a cumulative value Bruce Excel Worksheet Functions 5 January 25th 05 05:14 PM
Count If Formula Mimi Excel Worksheet Functions 0 November 5th 04 11:55 AM
count based on two fields - need quickly JO Excel Worksheet Functions 1 November 1st 04 09:44 PM


All times are GMT +1. The time now is 06:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"