Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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/ | |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Define Name range | Excel Discussion (Misc queries) | |||
Define a range | Excel Discussion (Misc queries) | |||
formula to sort a range so that it matches the exact rows of a column that is outside that range? | Excel Discussion (Misc queries) | |||
Define a range based on another named range | Excel Worksheet Functions | |||
How to define a Range with variant? | Excel Programming |