View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dan B Dan B is offline
external usenet poster
 
Posts: 60
Default how to remove symbols ahead of text and numbers copied from web

The symbols are visible in the cells. I tried the macro and it stripped out
too much. For example, some of the cells have strings of text and it took
out all the spaces between the words. Also, it did something to all the
numbers....where there was $10.00, it changed it to 1000.00


"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
First question...............

Do these marks show in the cell or just in the Formula Bar?

If the latter, they are Lotus formatting marks.

ToolsOptionsTransition, Uncheck all the Transition settings.

Then use the TRIM function to remove extra spaces.

If marks are actually visible in the cells, run this macro.

Public Sub StripAll_But_NumText()
Dim rConsts As Range
Dim rCell As Range
Dim i As Long
Dim sChar As String
Dim sTemp As String

On Error Resume Next
Set rConsts = Selection.SpecialCells(xlCellTypeConstants)
On Error GoTo 0
If Not rConsts Is Nothing Then
For Each rCell In rConsts
With rCell
For i = 1 To Len(.text)
sChar = Mid(.text, i, 1)
If sChar Like "[0-9a-zA-Z]" Then _
sTemp = sTemp & sChar
Next i
.Value = sTemp
End With
sTemp = ""
Next rCell
End If
End Sub


Gord Dibben MS Excel MVP

On Thu, 8 Feb 2007 10:06:17 -0700, "Dan B" wrote:

I copied some data from a report on a web page into excel.

The numbers have a " and a space in front of them, the dates have a ^ in
front. I tried find and replace and it didn't find these symbols. How
can
I remove these? They are making my formulas not work because excel
doesn't
recognize the numbers.

Thanks.