Thread: strikethroughs
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.setup
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default strikethroughs

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

On Wed, 15 Nov 2006 10:45:02 -0800, strikethrughs
wrote:

How do you apply strikethroughs to a row where some cells contains characters
and other cells contains spaces?