ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find End of Range, (https://www.excelbanter.com/excel-programming/414571-find-end-range.html)

ryguy7272

Find End of Range,
 
I am hoping to find a way of finding the end of a used range (different on
each sheet), move over five columns, and color the entire range, in column X,
from cell X6 to this cell lower boundary of the used range.

I can find the end of the used range with this line of code:
Cells(Rows.Count, "S").End(xlUp).Select

I need to do this for several spreadsheets in a workbooks that I just
created; I am using a For...Next Loop and this part is fine...just need to
get a handle on this colored range thing.





--
RyGuy

Wigi

Find End of Range,
 
Hi

Something like this:

Range("X6:X" & Cells(Rows.Count, "S").End(xlUp).Row).Interior.Colorindex = 3
'some number for color

--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"ryguy7272" wrote:

I am hoping to find a way of finding the end of a used range (different on
each sheet), move over five columns, and color the entire range, in column X,
from cell X6 to this cell lower boundary of the used range.

I can find the end of the used range with this line of code:
Cells(Rows.Count, "S").End(xlUp).Select

I need to do this for several spreadsheets in a workbooks that I just
created; I am using a For...Next Loop and this part is fine...just need to
get a handle on this colored range thing.





--
RyGuy



All times are GMT +1. The time now is 01:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com