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

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,500
Messages
5,832,072
Members
430,110
Latest member
Chyke_mxl

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
Top