Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to apply CLEAN func.
Hi there,
How to creates macro that use the clean function for a selection in a spreadsheet ? Also how to remove just the ? mark from a selection in a spreadsheet? I have a spreadsheet the hold names with ? at the and of a cell and I wanted to remove it without removing the name. Thanks an advanced Oded Dror Email: |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to apply CLEAN func.
#1.
Option Explicit Sub testme() Dim myRng As Range Dim myCell As Range Set myRng = Nothing On Error Resume Next Set myRng = Intersect(Selection, _ Selection.Cells _ .SpecialCells(xlCellTypeConstants, xlTextValues)) On Error GoTo 0 If myRng Is Nothing Then MsgBox "nothing to clean in that selection" Exit Sub End If For Each myCell In myRng.Cells myCell.Value = Application.Clean(myCell.Value) Next myCell End Sub #2. Select your range and edit|replace. But use ~? (tilde question mark) in the Find What box. The question mark is a wild card. The tilde tells excel that you really want a question mark. (same technique for both the asterisk and tilde (~* and ~~).) Oded Dror wrote: Hi there, How to creates macro that use the clean function for a selection in a spreadsheet ? Also how to remove just the ? mark from a selection in a spreadsheet? I have a spreadsheet the hold names with ? at the and of a cell and I wanted to remove it without removing the name. Thanks an advanced Oded Dror Email: -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to use the $ to do global func =ave($1:$1) more details? | Excel Discussion (Misc queries) | |||
How 2 sum the abs values of several cells w 1 func in XL. | Excel Worksheet Functions | |||
How 2 sum the abs values of several cells w 1 func in XL. | Excel Worksheet Functions | |||
Help pls! Max func to display value of different cell? | Excel Worksheet Functions | |||
start a macro from a func | Excel Programming |