ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CLEAN Formula in Excel (https://www.excelbanter.com/excel-programming/327325-re-clean-formula-excel.html)

Gord Dibben

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




All times are GMT +1. The time now is 09:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com