Then you only see the ' in the formulabar and not in the cell
Am I right?
If you place a ' in front of a number for example Excel see it as text then.
--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl
"jloberg" wrote in message ...
Thanks, Ron! This was the simple solution I was looking for ... sort
of.
Get this: your macro returns [50.234] from ['150.234] .... but when I
remove the second cell.Value line in your macro I get a clean
[150.234]. This will work sufficiently.
But I'm curious why the ' is removed.
Thank you for your help.
loberg
*
Sub test()
For Each cell In Selection
On Error Resume Next
cell.Value = Left(cell.Value, Len(cell.Value) - 3)
On Error GoTo 0
Next
End Sub
*
Ron de Bruin wrote:
[b]Try something like this for the selection
Sub test()
For Each cell In Selection
On Error Resume Next
cell.Value = Left(cell.Value, Len(cell.Value) - 3)
cell.Value = Right(cell.Value, Len(cell.Value) - 1)
On Error GoTo 0
Next
End Sub
--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl
------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/