text and numbers

  • Thread starter Thread starter Cam
  • Start date Start date
C

Cam

Can anyone answer this: When i paste in info from a web
site, one of the columns contains numbers, yet when I try
to refer to those numbers in formulas in other cells, it
always comes up with the #VALUE! message, as though it
were text in there, not numbers. Any ideas?
 
Select the range with pasted web numbers, do edit>replace and click in the
what box,
hold down alt while typing 0160 on the numpad, release alt, leave replace
with blank
(note when you do theis you won't see anythingin the what box), then replace
all.
If you do this a lot, record a macro after you have selected the range or
else it will select the same range
when you run the macro.. If you do that it might look like this

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 10/15/2003 by Peo Sjoblom
'

'
Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Application.CutCopyMode = False
End Sub

to make it more understandable you can replace the invisible sign with it's
code

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 10/15/2003 by Peo Sjoblom
'

'
Selection.Replace What:=Chr(160), Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Application.CutCopyMode = False
End Sub
 
Back
Top