View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default from num to text - end sub


Dim cell As Object

Range("H1:H5200").NumberFormat = "@"
For Each cell In Range("H1:H5200")
If cell.Value < "" Then

cell.Value = Right(cell.Value, Len(cell.Value) - 1)
Else

Exit For
End If
Next cell


--
__________________________________
HTH

Bob

"???? ?????" wrote in message
...
Hello,

We have this code to transform data from num to text

I want to exit this code (loop) when there are no more value's in the
column
(empty)

what do i have to edit to that code ?

Range("H1:H5200").Select
Selection.NumberFormat = "@"

Dim cell As Object
For Each cell In Selection
cell.Value = " " & cell.Value
cell.Value = Right(cell.Value, Len(cell.Value) - 1)
Next




--
???? ???