You might try something like this:
Sub Cancella_Weekend()
Dim lngCol As Long
Dim lngColX As Long
Dim RowCount As Long
With Sheets("PRIMO_SEMESTRE")
RowCount = .Range(.Cells(5, 1), .Cells(5, 1).End(xlDown)).Count
For lngCol = 6 To 187 'columns F to GE
If Weekday(.Cells(4, lngCol), vbMonday) 5 Then
.Cells(5, lngCol).Resize(RowCount).Interior.ColorIndex = 15
'xlNone
End If
Next lngCol
End With
''same for other sheet
--
Jim Rech
Excel MVP
"sal21 " wrote in message
...
| This file contain 2 sheet and a macro that colorize a column.
|
| my problem is possible to colorize entire column saturday and sunday in
| grey to the last useful record is present i column A of sheet
| PRIMO_SEMESTRE and SECONDO_SEMESTRE? I have insert the condition to
| colorize until 15000.
|
| In my case i wuold want to colorized column to end in line 811...
|
| My idea is to make a control if in the column A is present a number, or
| another value....(boh!?)
|
| Attachment filename: cartel2.zip
| Download attachment:
http://www.excelforum.com/attachment.php?postid=639095
| ---
| Message posted from
http://www.ExcelForum.com/
|