Define Certain Exact Range

sal21

Active Member
Joined
Apr 1, 2002
Messages
291
This file contain 2 sheet and a macro that colorize a column.

http://www.gssitaly.com/cartel2.zip

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!?)
 
SydneyGeek said:
sal, try this variation...
Code:
Sub FillGrey()
  Dim R As Long
  Dim c As Range
  Dim wsh As Worksheet
  
  For Each wsh In ActiveWorkbook.Worksheets
    If wsh.Name = "PRIMO_SEMESTRE" Or wsh.Name = "SECONDO_SEMESTRE" Then
      wsh.Activate
      R = Range("A65536").End(xlUp).Row
      Range(Range("F1"), Range("F1").End(xlToRight)).Select
      For Each c In Selection
        If c.Value = 7 Then 'Saturday
          c.Offset(4, 0).Resize(R - 4, 2).Interior.ColorIndex = 15
        End If
      Next c
    End If
  Next wsh
End Sub
Denis

naturally it work great! Tks and good vacation...
 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,216,073
Messages
6,128,645
Members
449,461
Latest member
kokoanutt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top