Define Certain Exact Range
This file contain 2 sheet and a macro that colorize a column.
my problem is possible to colorize entire column saturday and sunday i grey to the last useful record is present i column A of shee PRIMO_SEMESTRE and SECONDO_SEMESTRE? I have insert the condition t 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, o another value....(boh!? Attachment filename: cartel2.zip Download attachment: http://www.excelforum.com/attachment.php?postid=63909 -- Message posted from http://www.ExcelForum.com |
Define Certain Exact Range
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/ | |
Define Certain Exact Range
Jim Rech wrote:
*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 an sunday in | grey to the last useful record is present i column A of sheet | PRIMO_SEMESTRE and SECONDO_SEMESTRE? I have insert the conditio 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 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/ | * TKS FOR HELP -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 10:53 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com