Stike out text in a cell

F

Frank Beltre

I have a spreadsheet with strike out text combine with regular text in a
cell. How do I remove only the strike out text from the cells? The column
is over 7000 rows and it would be great if I can accomplish this task
automatically.
Thanks in advance for any help provided.

Frank
 
G

Gord Dibben

Frank

CTRL + a(twice in 2003) to select all cells.

Format>Cells>Font. Uncheck "strikethrough"


Gord Dibben MS Excel MVP
 
F

Frank Beltre

Gord,

Thank you for replying. I tried it, but it just removes the strikethrough
line from the text. I need all the strikethrough text to be deleted. I am
using 2007.
Thanks,

Frank
 
G

Gord Dibben

Sorry about that.........misread.

Got to go now but will get back later and see what can be done.

Hope you get an answer sooner.


Gord
 
G

Guest

Enter this macro.
Select the cells you want to clean-up.
Run the macro.


Sub no_strike()
'
' gsnuxx
'
For Each r In Selection
v = r.Value
v_out = ""
For i = 1 To Len(v)
piece = Mid(v, i, 1)
If r.Characters(Start:=i, Length:=1).Font.Strikethrough = False Then
v_out = v_out & piece
End If
Next
r.Value = v_out
Next
End Sub
 
G

Gord Dibben

Thanks for chipping in.

Does the job. I like the way you eliminated the spaces.

My attempts.....not yet posted but why bother now........got rid of the
strikethrough text but left spaces.


Gord
 
F

Frank Beltre

Freaking awesome! It works really good! I got it to work on Excel 2007,
having a compile error in 2003, but nothing I can't figure out.
Thank you guys for the support.

Frank
 
F

Frank Beltre

Spoke too soon! Do I need to modify the code for it to work in Excel 2003,
Visual Basic 6.3? I am getting a "compile error: Syntax error". It is
working fine in Excel 2007 though. I need to do this in my work computer,
which is the one with Excel 2003.

Thanks,

Frank
 
F

Frank Beltre

Never mind that. I got it to work. I was inadvertently copying the code in
the wrong place.
Thank you again,

Frank
 
G

Guest

You are very welcome.

This kind of application is MUCH easier in Word than Excel, but still
"do-able"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top