G
greg.jobs
Using Excel is it possible to 'transpose' numbers
e.g. 48 becomes 84?
e.g. 48 becomes 84?
Greg,
Please don't post the same question in multiple newsgroups, unless you've indicated in your
post that you've done that, and to which newsgroup you wish to have replies. It causes
redundant effort on the part of the responders when they don't see that your question was
already answered in another group, and then they say bad words.
Here's a user-defined function that will handle any number of digits. It returns a text
string, so you'll get zeroes properly.
Function Reverse(indata As Range) As String
Reverse = StrReverse(indata.Text)
End Function
Paste it from here into a regular module in your workbook, then call it in a cell, to wit:
=Reverse(A2)
If it is always a 2 digit integer, you could use =LEFT(A1)+10*RIGHT(A1)
What if it was
- always 4 digits e.g. 4000
- always 5 digits e.g. 10,000
(and I wanted to transpose the 2nd and 3rd digits)
If I wanted to do this to MANY MANY cells, would it be more suitable
to use a formula or to write a macro?
Kind regards
Greg
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.