Reversing Data

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Can you reverse the data in two different columns? If I have the
following column of numbers...

64
32

21
23
56
82
23

24
12

1

I want to reverse the data in the second group so it reads:

12
32
65
82
32

Is there an easy way to do that all at once?

Thanks
 
you could use a user defined function. paste the code into a vba module

Function RevText(strText As String) As String
RevText = StrReverse(strText)
End Function

and use it like any other XL function
=RevText(A4)
and copy it down. to coerce the return value from text back to numeric use
=--RevText(A4)

if you are new to vba, david mcritchie has some tutorials on his site to
help you navigate the vba editor.

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

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

Back
Top