ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using variables to select a range (https://www.excelbanter.com/excel-programming/283895-using-variables-select-range.html)

Marc[_14_]

Using variables to select a range
 
I am trying to pull a number from a cell and use it to select a range of cells

Dim days as integer

days = range("A1").value

range(B1:C & days).select

what is the exact syntax including any other line of code required. Assume I know nothing.

Tim Williams

Using variables to select a range
 
close!

Try
range("B1:C" & days).select

Tim

"Marc" wrote in message
...
I am trying to pull a number from a cell and use it to select a range of

cells

Dim days as integer

days = range("A1").value

range(B1:C & days).select

what is the exact syntax including any other line of code required.

Assume I know nothing.




All times are GMT +1. The time now is 05:19 PM.

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