View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jaemun Jaemun is offline
external usenet poster
 
Posts: 20
Default how to reverse cells value

Hi Gary,

Actually, I'm preffered functions very much right now. Anyway, thank and my
appreciate for your help. And I could used that stuff too in my next work:)

Jaemun.


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
knew there was strreverse function as gord described, but wanted to try

some
convoluted approach to see what happend. i am sure someone can come up

with
something else.

here is a macro that works here when the values are in column A if you run
it twice, it should put them back in the original order


Sub reverse()
Dim lastrow As Long
Dim rng As Range
Dim cell As Range
Dim r As Integer
r = 1
lastrow = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row

For Each cell In Range("A1:A" & lastrow)
Set rng = Range("a" & r)
i = 1
l = Len(rng)
temp = cell
For i = 1 To Len(rng) - 1 Step 1
temp = temp & Mid(rng, l - i, 1)
Next
rng.Value = Mid(temp, l, l)
r = r + 1
Next
End Sub


--


Gary


"Jaemun" <x wrote in message
...
How to the number that seperate with commas e.g. 11,22,33,44 to become
44,33,22,11 using formula functions?