ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   HELP - PLEASE!!!!! (https://www.excelbanter.com/excel-discussion-misc-queries/21748-help-please.html)

ac512

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

Jack Sons

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




Jim May

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






Lady Layla

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
:
:



Dave Peterson

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

ac512

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


Jack Sons

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
:
:






All times are GMT +1. The time now is 09:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com