reverse a series of numbers from 1 cell into another

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.
 
C

carlo

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
 
R

Ron Coderre

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)
 
C

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)






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

mgriffiths

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

Ask a Question

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.

Ask a Question

Top