Friday, July 29, 2011

Return Range Value in Reverse Order :

if you want  Value of selected Range in Reverse Order :



Sub Reverse()
 Dim fRng As Range
 Dim Couter As Integer
 Dim cell As Range
   
    Set fRng = Application.InputBox("Please Choose A Range", , , , , , , 8)
    Set cell = Application.InputBox("Please Choose a Cell for Output", , , , , , , 8)
    cell.Activate
        For counter = fRng.Cells.Count To 1 Step -1
            ActiveCell.Value = fRng.Cells(counter, 1)
            ActiveCell.Offset(1, 0).Select
        Next
 End Sub

No comments: