EXCEL HELP

  • Thread starter Thread starter MaggieR
  • Start date Start date
M

MaggieR

I have the numbers 123 in A1 and would like to know if there is a formula
that will reverce the information in A1 and in B1 give a result of 321. Thank
you
 
Can you make do with a UDF?

Public Function RevStr(rng As Range)
RevStr = StrReverse(rng.text)
End Function

=revstr(cellref)

If you want to use the 321 as a number

=revstr(cellref) * 1


Gord Dibben MS Excel MVP
 
What is a UDF?

When I type in =revstr(B1) or =revstr(B1)*1 they both come back with NAME?

Did I do something Wrong?
 
=SUMPRODUCT((MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))*(10^(ROW(INDIRECT("1:"&LEN(A1)))-1)))

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
bob, that worked on the numeric cells(THANK YOU) but what would I do if they
were numeric and alpha numeric in the same cell?
 
A UDF is a User Defined Function.

With Bob's SUMPRODUCT formula you don't need the UDF

But just in case...........

Since you're not familiar with VBA and macros, see David McRitchie's site for
more on "getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or Ron de De Bruin's site on where to store macros.

http://www.rondebruin.nl/code.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and Insert>Module. Paste the UDF in there. Save the
workbook and hit ALT + Q to return to your workbook.

Assuming A1 has 123

In B1 enter =revstr(A1) or revstr(A1) * 1


Gord
 
It won't work, it is based upon a multiplication technique, and you cannot
multiply text.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Bob is there a different technique that could be used rather than a
multiplication to get a numberic/alpha numeric out come? Since most of the
data needing to be converted is both alpha and numeric we are having to hand
change 37K entries. THank you for your previous help by the way!!!!!!!!!!!!
 
Bob is there a different technique that could be used rather than a
multiplication to get a numberic/alpha numeric out come? Since most of the
data needing to be converted is both alpha and numeric we are having to hand
change 37K entries. THank you for your previous help by the way!!!!!!!!!!!!

Use Gord's UDF solution!
--ron
 
Back
Top