ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Variable in Range statement (https://www.excelbanter.com/excel-programming/285383-variable-range-statement.html)

mike

Variable in Range statement
 
Hi. I have the variable "x" which returns the row number
of the activecell. I would like to set "myrange" to be
equal to the range C26 to Y of the active row. Can
someone show me how to write the range statement using
the variable x?

myrange = range(C26:Y .... what do I put here?)

Thanks,
Mike.

Tim Williams

Variable in Range statement
 
set myrange = range("C26:Y" & x)


tim


"Mike" wrote in message
...
Hi. I have the variable "x" which returns the row number
of the activecell. I would like to set "myrange" to be
equal to the range C26 to Y of the active row. Can
someone show me how to write the range statement using
the variable x?

myrange = range(C26:Y .... what do I put here?)

Thanks,
Mike.




mike

Variable in Range statement
 
Thanks, Tim

-----Original Message-----
set myrange = range("C26:Y" & x)


tim


"Mike" wrote in

message
...
Hi. I have the variable "x" which returns the row

number
of the activecell. I would like to set "myrange" to be
equal to the range C26 to Y of the active row. Can
someone show me how to write the range statement using
the variable x?

myrange = range(C26:Y .... what do I put here?)

Thanks,
Mike.



.



All times are GMT +1. The time now is 07:31 PM.

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