reverse a series of numbers from 1 cell into another

  • Thread starter Thread starter mgriffiths
  • Start date Start date
M

mgriffiths

How can I reverse numbers from one cell into another? Example A1
contains 64082... B1 (I want to show) 28064. Any suggestions would be
appreciated. Thanks.
 
How can I reverse numbers from one cell into another? Example A1
contains 64082... B1 (I want to show) 28064. Any suggestions would be
appreciated. Thanks.

Hi

this is an arrayformula....has to be entered with ctrl+shift+enter
instead
of only enter:
=TEXT(SUMPRODUCT(MID(A1,ROW(INDIRECT("1:" & LEN(A1))),
1)*10^(ROW(INDIRECT("1:" & LEN(A1)))-1)),REPT("0",LEN(A1)))

hth

Carlo
 
With a number in cell A1

Try this:
=SUMPRODUCT(MID(A1,ROW($A$1:INDEX($A:$A,LEN(A1),1)),1)*10^(ROW($A$1:INDEX($A:$A,LEN(A1)))-1))

Note: Since text wrap will probably impact the display, here's that formula
in sections:
=SUMPRODUCT(MID(A1,ROW($A$1:INDEX($A:$A,LEN(A1),1)),1)
*10^(ROW($A$1:INDEX($A:$A,LEN(A1)))-1))


Is that something you can work with?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)
 
With a number in cell A1

Try this:
=SUMPRODUCT(MID(A1,ROW($A$1:INDEX($A:$A,LEN(A1),1)),1)*10^(ROW($A$1:INDEX($-A:$A,LEN(A1)))-1))

Note: Since text wrap will probably impact the display, here's that formula
in sections:
=SUMPRODUCT(MID(A1,ROW($A$1:INDEX($A:$A,LEN(A1),1)),1)
*10^(ROW($A$1:INDEX($A:$A,LEN(A1)))-1))

Is that something you can work with?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)






- Show quoted text -

Just a quick add:

the difference between my (found it on the web!) formula and Rons
formula
is the 0. If you have a number like 234000 my formula would give you
000432
Rons Formula would give you 432.

If you don't need the zeros go with rons formula.

hth

Carlo
 
Hi

this is an arrayformula....has to be entered with ctrl+shift+enter
instead
of only enter:
=TEXT(SUMPRODUCT(MID(A1,ROW(INDIRECT("1:" & LEN(A1))),
1)*10^(ROW(INDIRECT("1:" & LEN(A1)))-1)),REPT("0",LEN(A1)))

hth

Carlo

THANKS!!!
 
Back
Top