![]() |
Name range example
I know this will work to name a range for a single column.
Range(Selection, Selection.End(xlDown)).Name = "Test" But, how would you adapt it to include the next 3 columns to the right? Thanks, J.O. |
Name range example
Use Resize:
Range(Selection, Selection.End(xlDown)).Resize(,3).Name = "Test" for a total of 3 columns. Change the 3 to a 4 if it is 3 additional columns. -- Regards, Tom Ogilvy "excelnut1954" wrote: I know this will work to name a range for a single column. Range(Selection, Selection.End(xlDown)).Name = "Test" But, how would you adapt it to include the next 3 columns to the right? Thanks, J.O. |
Name range example
Range(Selection.Resize(1, 3), Selection.End(xlDown)).Name = "Test"
"Tom Ogilvy" skrev: Use Resize: Range(Selection, Selection.End(xlDown)).Resize(,3).Name = "Test" for a total of 3 columns. Change the 3 to a 4 if it is 3 additional columns. -- Regards, Tom Ogilvy "excelnut1954" wrote: I know this will work to name a range for a single column. Range(Selection, Selection.End(xlDown)).Name = "Test" But, how would you adapt it to include the next 3 columns to the right? Thanks, J.O. |
All times are GMT +1. The time now is 06:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com