View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default CLEAN Formula in Excel

Kristen

Sub Clean_Stuff()
Dim Cell As Range
For Each Cell In Selection
If (Not IsEmpty(Cell)) And _
Not IsNumeric(Cell.Value) And _
InStr(Cell.Formula, "=") = 0 _
Then Cell.Value = Application.Clean(Cell.Value)
Next
End Sub


Gord Dibben Excel MVP

On Tue, 12 Apr 2005 15:30:05 -0700, "Kristen"
wrote:

I am trying to use the CLEAN formula in Excel which removes unprintable
characters. I can do it for one cell at a time by using the formula
=Clean(cell reference) but I need to do it for a range of cells as I have
unprintable characters throughout my entire worksheet. I've tried the
following formula =Clean(1st cell reference:last cellreference) but I get a
#Value error. Any ideas or suggestions would be GREATLY appreciated!

Kristen