![]() |
|
#3
|
|||
|
|||
|
Hi Colin,
Again you made it easy. Thanks for your help. Question: I never was able to get the code you provided to sort my sheet the way I need it too. Here is the code and I attached a workbook to show what I'm looking for. I really don't understand this one. Maybe you can explain and tell me what I need to do. Code:
Sub SortDaysProvider()
Dim DayRange As Long
Dim TopRow As Long
Dim sRange As Range
Dim fRange As Range
Application.ScreenUpdating = False
For DayRange = 1 To 365
TopRow = (DayRange * 17) + 9
With ActiveWorkbook.Worksheets("Input Calendar (2012)")
Set sRange = .Range("B" & TopRow & ":" & "O" & TopRow + 5)
Set fRange = .Range("B" & TopRow & ":" & "B" & TopRow + 5)
With .Sort
.SortFields.Add _
Key:=fRange, _
SortOn:=xlSortOnValues, _
Order:=xlAscending, _
DataOption:=xlSortNormal
.SetRange sRange
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
Application.Calculate
.Apply
.SortFields.Clear
End With
End With
Next DayRange
Application.ScreenUpdating = True
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Word opens with 2 pgs | jmacky | Word | 4 | 01-28-2013 09:10 AM |
#REF! error when opening a workbook that contain a refference to another workbook
|
tanababa | Excel | 2 | 06-07-2012 03:11 PM |
| Range(Cell1,Cell2) Error on another workbook controlling some other workbook? | tinfanide | Excel Programming | 1 | 02-09-2012 04:08 PM |
macro to transfer data from one workbook to another workbook
|
virsojour | Excel Programming | 5 | 02-01-2011 08:58 PM |
Select a range in one one workbook while working in other workbook
|
Slow&Steady | Excel | 1 | 02-21-2010 03:34 AM |