Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The macro below works, but can it be simplified?
What this macro is doing is putting an "H" (for holidays) in the appropriate cells. Sub HolidaySelection() Dim i As Long Dim j As Long Range("startpoint").Select Range("B11:AF22").ClearContents For i = 1 To 12 For j = 1 To 31 If Application.WorksheetFunction.CountIf(Worksheets(" Holidays").Range("F5:F13"), DateSerial(Range("VacYear"), i, j)) Then ActiveCell.Offset(i, j) = "H" End If Next j Next i End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Condensing VBA code | Excel Discussion (Misc queries) | |||
Condensing Format Code | Excel Programming | |||
Condensing Code | Excel Programming | |||
Need help condensing with-end with code | Excel Programming | |||
Trouble Condensing Code | Excel Programming |