Thread: Macro help
View Single Post
  #5   Report Post  
Jeff Garrett
 
Posts: n/a
Default

Sub Macro1()
Dim varColumn As String
Dim varNo As String
For varColumn = "A" To "IV"
varNo = varColumn & 1
Range([varNo]).Select
Application.CutCopyMode = False
Selection.Sort Key1:=Range(ActiveCell, ActiveCell.End(xlUp)).Select,
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next varColumn
End Sub


Basically, I want to go from Cell B1 to Cell IV1, and call this macro to
sort the column that is currently selected descendingly. It will be all
integers, some non-entries representing a 0. The whole reason to do a macro
is because there is like 200 entries in the worksheet.

Any and all suggestions are welcome.