Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default How to format with a strikethrough like something's been crossed out

I'd like to write text in a cell and have a line go through the middle
showing that it's been "crossed out".

How do I do that?

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to format with a strikethrough like something's been crossed out

Select the cells to fix
Format|Cells|Font Tab
check strikethrough



" wrote:

I'd like to write text in a cell and have a line go through the middle
showing that it's been "crossed out".

How do I do that?

Thanks.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default How to format with a strikethrough like something's been crossed out

Range("A1").FormulaR1C1 = "text"
Range("A1").Font.Strikethrough = True

Hth,
merjet

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default How to format with a strikethrough like something's been crossed o

To do that in A1,

Range("A1").Value = "Cross this out"
Range("A1").Font.Strikethrough = True


" wrote:

I'd like to write text in a cell and have a line go through the middle
showing that it's been "crossed out".

How do I do that?

Thanks.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default How to format with a strikethrough like something's been crossed o

Private Sub Worksheet_Change(ByVal Target As Range)
'Strikethrough ignore spaces
Dim v As Variant, i As Integer
If Not Intersect(Target, Columns("A")) Is Nothing Then
If Target(1, 1).HasFormula = False Then
v = Target(1, 1).Value
Application.EnableEvents = False
For i = 1 To Len(v)
If Not (Mid(v, i, 1)) = Chr(32) Then
Target(1, 1).Characters(Start:=i, _
Length:=1).Font.Strikethrough = True
End If
Next i
Application.EnableEvents = True
End If
End If
End Sub


Gord Dibben MS Excel MVP

On Thu, 1 Mar 2007 18:02:05 -0800, Vergel Adriano
wrote:

To do that in A1,

Range("A1").Value = "Cross this out"
Range("A1").Font.Strikethrough = True


" wrote:

I'd like to write text in a cell and have a line go through the middle
showing that it's been "crossed out".

How do I do that?

Thanks.



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
IF Strikethrough lightbulb Excel Discussion (Misc queries) 5 April 4th 23 02:11 PM
all of a sudden - something's different davey1108 Excel Discussion (Misc queries) 3 September 16th 07 05:09 AM
How do I format a letter in Excell with double strikethrough N? jt19373 Excel Discussion (Misc queries) 2 April 11th 06 12:49 AM
StrikeThrough Ben Excel Programming 1 November 4th 04 11:46 AM
create a source table from a special pasted value dynamic crossed table Tom Ogilvy Excel Programming 0 September 29th 03 08:59 PM


All times are GMT +1. The time now is 07:43 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"