Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Setup / November 2006

Tip: Looking for answers? Try searching our database.

strikethroughs

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
strikethrughs - 15 Nov 2006 18:45 GMT
How do you apply strikethroughs to a row where some cells contains characters
and other cells contains spaces?
kassie - 16 Nov 2006 15:56 GMT
Not clear what you are after?  Spaces will appear like a minus sign, while
text and numbers will appear like strikethrough.

> How do you apply strikethroughs to a row where some cells contains characters
> and other cells contains spaces?
Gord Dibben - 16 Nov 2006 20:51 GMT
I assume you don't want the spaces having a strikethrough.

A macro or event code can find the spaces and ignore them.

Macro..............

Sub strike_through()
'Strikethrough ignore spaces
Dim v As Variant, i As Integer
Dim cel As Range
For Each cel In Selection
   If cel.HasFormula = False Then
       v = cel.Value
           For i = 1 To Len(v)
           If Not (Mid(v, i, 1)) = Chr(32) Then
           cel.Characters(Start:=i, _
           Length:=1).Font.Strikethrough = True
           End If
       Next i
     End If
Next cel
End Sub

Gord Dibben  MS Excel MVP

>How do you apply strikethroughs to a row where some cells contains characters
>and other cells contains spaces?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.