Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default how do you reverse the orders of numbers?

I have a list of data and i need to reverse the order of the numbers..for
example
46183
29830
50784
49774
22199

needs to be
38164
03892
48705
47794
99122

Please help.
Thank you in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default how do you reverse the orders of numbers?

I see you will end up with leading zeros, and you presumably want to
keep these. If your first number is in A1 and is five digits as shown,
then enter this in B1:

=MID(A1,5,1)&MID(A1,4,1)&MID(A1,3,1)&MID(A1,2,1)&M ID(A1,1,1)

You could use RIGHT in the first expression and LEFT in the final
expression, but this makes it easier for you to see how to cope with 6
or 7 digit numbers etc.

The formula can be copied down for as many numbers as you have, and
leading zeros will be preserved as you will end up with a text value
that looks like a number.

Hope this helps.

Pete

JohnB wrote:
I have a list of data and i need to reverse the order of the numbers..for
example
46183
29830
50784
49774
22199

needs to be
38164
03892
48705
47794
99122

Please help.
Thank you in advance.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default how do you reverse the orders of numbers?

Sort descending. Select the column of number and on the standard toolbar
click the button that has a Z/A with a down arrow to sort descending. The
A/Z with a down arrow is your sort ascending button.
--
Kevin Backmann


"JohnB" wrote:

I have a list of data and i need to reverse the order of the numbers..for
example
46183
29830
50784
49774
22199

needs to be
38164
03892
48705
47794
99122

Please help.
Thank you in advance.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 82
Default how do you reverse the orders of numbers?

Excel has no function to reverse text, but a simple function like the
following will use the vba function to reverse text in Excel.

Function ReverseTxt(text)
ReverseTxt= StrReverse(text)
End Function

If you put this function in a module you can use it like any other Excel
function, so if you have a value of 46183 in cell A1 then a formula of
=ReverseTxt(A1) will return 38164

HTH,

TK

"JohnB" wrote:

I have a list of data and i need to reverse the order of the numbers..for
example
46183
29830
50784
49774
22199

needs to be
38164
03892
48705
47794
99122

Please help.
Thank you in advance.

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
conditional formatting Lofty Excel Worksheet Functions 7 July 10th 06 09:06 PM
How to generate sets of random numbers without having duplicates William Excel Worksheet Functions 1 June 6th 06 05:30 AM
Why are 1/2 my numbers imported as text and the rest as numbers? KBear Excel Discussion (Misc queries) 2 April 21st 06 01:40 PM
How do I sort letters before numbers in Excel? RiverGirl Excel Discussion (Misc queries) 4 May 27th 05 04:09 PM
Checking Winning Numbers in the Lottery. Ann Excel Discussion (Misc queries) 4 May 18th 05 10:55 AM


All times are GMT +1. The time now is 12:06 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"