E
Eric Blitzer
I would like to reverse the order of characters (not sort)
in a cell
ex
47357 to 75374
jrbkl to lkbrj
thanks
Eric
in a cell
ex
47357 to 75374
jrbkl to lkbrj
thanks
Eric
....JE McGimpsey said:This can be rectified if you use the Text property instead:
Public Function reverse_it(rng As Range) ....
ret_value = ret_value + Mid(rng.Text, i, 1)
Harlan Grove said:Building up by concatenation just rubs the wrong way. Two iteration indices
just feels better.
JE McGimpsey said:Public Function StrReverse(sExpression As String) As String ....
Dim byArr() As Byte
Dim byRev() As Byte
byArr = sExpression ....
For j = 1 To i
byRev(j) = byArr(i)
i = i - 1
Next j ....
Tests faster than using Mid()
Harlan Grove said:Something new every day. Thanks for this. I didn't think direct assignment
between strings and arrays of bytes was possible.
JE McGimpsey said:One note: as written, it has the ability to really mess up Unicode,
since Unicode characters require two bytes.
....Harlan Grove said:perverse VB[A] semantics in which