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
 

Some videos you may like

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Yogi Anand

MrExcel MVP
Joined
Mar 12, 2002
Messages
11,454
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
 

Glenn

Active Member
Joined
Sep 20, 2003
Messages
325
Thanks Yogi,

You interpreted it precisely!!! :biggrin:

Cheers Glenn
 

Watch MrExcel Video

Forum statistics

Threads
1,118,910
Messages
5,574,987
Members
412,632
Latest member
robertmwaring2
Top