#1   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 1
Default strikethroughs

How do you apply strikethroughs to a row where some cells contains characters
and other cells contains spaces?
  #2   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 268
Default strikethroughs

Not clear what you are after? Spaces will appear like a minus sign, while
text and numbers will appear like strikethrough.

"strikethrughs" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.setup
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?


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
Any way to count cells contining one, or more STRIKETHROUGHS? Father Guido Excel Discussion (Misc queries) 7 March 3rd 19 01:09 PM
Need to sum values that are not strikethroughs Rock New Users to Excel 1 May 3rd 06 02:17 PM


All times are GMT +1. The time now is 02:59 PM.

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"