Hi All
Trying to run a macro for a sort.
If fixed column - not a problem, but I want the macro to sort if column
month tally's with B1
E.g. if Month 1-3-06 then sorts column D if 1-4-06 sorts column E etc.
I have created a little formula that high-lights the current month - i.e.
=IF($B$1=D5,"COLUMN /\","") if that helps?
A B C D E
1 Month| 01/03/2006|
2 THEN CLICK BELOW RUN SORT ROUTINE
3 COLUMN/\
4
5 Name |BRANCH |01/02/2006| 01/03/2006| 01/04/2006
This is Code if FIXED COLUMN.
Rows("5:81").Select
Application.CutCopyMode = False
Selection.sort Key1:=Range("G5"), Order1:=xlDescending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
Any help appreciated.
Paul T
PS: Resubmitted as text with no attachmnets.
Bookmarks