Can I reverse order of set of cells if original is left to right .

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We obtain data from an instrument into Excel in the opposite order from what
we need. Is there any way to reverse the order of the cells, not just
transpose from horizonal to vertical, for example, but to physical change the
order going from left to right to now going from right to left (not on a
graph but in the excel cells.)
 
Not sure I understand what you want, but you can Sort from Left to Right.
Go to Data|Sort. When the dialogue box opens, Pick Options in the bottom
Left corner. Then, switch to Sort Left to Right.

tj
 
If you don't want them sorted but just reversed.....

Method one.......

In an adjacent row enter the numbers 1 through whatever.

Select this row and your data row and sort left to right descending on the
numbers row.

When happy, delete the numbers row.

Method two..........

Sub ReversI()
'David McRitchie 1998-07-30 documented in
' http://www.mvps.org/dmcritchie/excel/join.htm
'Reverse (Flip) Item values in Range, Row, or Column [Ctrl+R]
'Counting in multiple rows/cols, item count proceeds down a
'column in range and continues top of next column in range
Dim tcells As Long, mCells As Long, ix As Long, ox As Long
Dim iValue As Variant
tcells = Selection.Count
mCells = tcells / 2
For ix = 1 To mCells
iValue = Selection.Item(ix).Value
ox = tcells + 1 - ix
Selection.Item(ix).Value = Selection.Item(ox).Value
Selection.Item(ox).Value = iValue
Next ix
End Sub


Gord Dibben Excel MVP
 
Hi RO,

Try this macro.

Option Explicit
Sub ReversIt()
Dim i As Integer
i = Range("IV1").End(xlToLeft).Column

For i = 1 To i
Range("IV1").End(xlToLeft).Select
ActiveCell.Cut Range("AA2").End(xlToLeft).Offset(, 1)
Next

End Sub

HTH
Regards,
Howard
 

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