Offset to color area

Glenn

Active Member
Joined
Sep 20, 2003
Messages
325
Hi,

I have columns of formulas starting at B3 across to D3. The number of rows that these formulas fill,
vary from this row 3 and down.

From E3 down I would like to color the column to match the number of rows that the formulas fill.

For example: if B3:D10 are filled with formulas the I'd like to color E3:E10.

I think to do this I need to find the last formula in column D and offset to column E to fill the area
from E3 down.

I've looked up here and done some macr recording but can't get it to work. Any help please?

This is what I've come up with so far but it doesn't work:
Code:
        Dim x As Range 
        Set x = Range("D65536").End(xlUp) 
        With x.Offset(1, 1) 
            Range(Selection, Selection.End(xlUp)).Select 
            Selection.Interior.ColorIndex = 17 
        End With
I need to get it to go up to E3 to fill the area.

Thanks.
Regards, Glenn
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi Glenn:

If I understand you correctly, you need to try the following ...
Code:
Dim x As Range
    Set x = Range("D3", Range("D3").End(xlDown))
    x.Offset(, 1).Interior.ColorIndex = 17
 
Upvote 0

Forum statistics

Threads
1,213,561
Messages
6,114,312
Members
448,564
Latest member
ED38

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