#1   Report Post  
ac512
 
Posts: n/a
Default HELP - PLEASE!!!!!

How can I reverse the values of cell?
EG. 1234 appears in a cell, and I would like to change it so that it
appears as 4321???
Any help would be greatly appreciated!
Thank you
  #2   Report Post  
Jack Sons
 
Posts: n/a
Default

Put this code in your personal.xls, then you will find this function in your
paste function box. With 1234 in A1 and =personal.xls!reversetext(A1) in
e.g. D5 you will get 4321 in D5.

I once picked this code up in our NG. Works fine.

Jack Sons
The Netherlands

"ac512" schreef in bericht
...
How can I reverse the values of cell?
EG. 1234 appears in a cell, and I would like to change it so that it
appears as 4321???
Any help would be greatly appreciated!
Thank you



  #3   Report Post  
Jim May
 
Posts: n/a
Default

In a standard module put:

Function ReverseString(rng As Range) As String
Dim i As Integer
For i = Len(rng.Value) To 1 Step -1
ReverseString = ReverseString & Mid(rng.Value, i, 1)
Next
End Function

Then use as any other formula, say in cell B1 enter =ReverseString(A1)
HTH



"Jack Sons" wrote in message
...
Put this code in your personal.xls, then you will find this function in

your
paste function box. With 1234 in A1 and =personal.xls!reversetext(A1) in
e.g. D5 you will get 4321 in D5.

I once picked this code up in our NG. Works fine.

Jack Sons
The Netherlands

"ac512" schreef in bericht
...
How can I reverse the values of cell?
EG. 1234 appears in a cell, and I would like to change it so that it
appears as 4321???
Any help would be greatly appreciated!
Thank you





  #4   Report Post  
Lady Layla
 
Posts: n/a
Default

What code?

"Jack Sons" wrote in message
...
: Put this code in your personal.xls, then you will find this function in your
: paste function box. With 1234 in A1 and =personal.xls!reversetext(A1) in
: e.g. D5 you will get 4321 in D5.
:
: I once picked this code up in our NG. Works fine.
:
: Jack Sons
: The Netherlands
:
: "ac512" schreef in bericht
: ...
: How can I reverse the values of cell?
: EG. 1234 appears in a cell, and I would like to change it so that it
: appears as 4321???
: Any help would be greatly appreciated!
: Thank you
:
:


  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default

And you have a couple of other replies at your first post.

ac512 wrote:

How can I reverse the values of cell?
EG. 1234 appears in a cell, and I would like to change it so that it
appears as 4321???
Any help would be greatly appreciated!
Thank you


--

Dave Peterson


  #6   Report Post  
ac512
 
Posts: n/a
Default

Thank you all very much!
I am most appreciative of your helpful assistance!

"ac512" wrote:

How can I reverse the values of cell?
EG. 1234 appears in a cell, and I would like to change it so that it
appears as 4321???
Any help would be greatly appreciated!
Thank you

  #7   Report Post  
Jack Sons
 
Posts: n/a
Default

Sorry, I forgot the code, it follows he

Function Reverse(InString) As String

'Try this UDF (from John Walkenbach's site) in a plain VBA module:

'UDF to reverse string - John W
Dim i As Integer
Dim StringLength As Integer
Reverse = ""
StringLength = Len(InString)
For i = StringLength To 1 Step -1
Reverse = Reverse & Mid(InString, i, 1)
Next i
End Function


Jack.

"Lady Layla" schreef in bericht
...
What code?

"Jack Sons" wrote in message
...
: Put this code in your personal.xls, then you will find this function in
your
: paste function box. With 1234 in A1 and =personal.xls!reversetext(A1) in
: e.g. D5 you will get 4321 in D5.
:
: I once picked this code up in our NG. Works fine.
:
: Jack Sons
: The Netherlands
:
: "ac512" schreef in bericht
: ...
: How can I reverse the values of cell?
: EG. 1234 appears in a cell, and I would like to change it so that it
: appears as 4321???
: Any help would be greatly appreciated!
: Thank you
:
:




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"