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

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
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,214,746
Messages
6,121,290
Members
449,021
Latest member
bob_messenger

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