ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to start from varible row (https://www.excelbanter.com/excel-programming/279473-how-start-varible-row.html)

Vimal[_2_]

how to start from varible row
 
Here is an example

p = 1
e = 5
Range(p & "a:b" & e).Select
if p is a variable row and u would want to start a
selection from colum 'a', microsoft will not accept the
above statement, only the 'b" & e' part works.

help, urgently please

thank u

Bob Phillips[_5_]

how to start from varible row
 
Vimal,

Try

Range("A"&p&":B"&e).Select

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Vimal" wrote in message
...
Here is an example

p = 1
e = 5
Range(p & "a:b" & e).Select
if p is a variable row and u would want to start a
selection from colum 'a', microsoft will not accept the
above statement, only the 'b" & e' part works.

help, urgently please

thank u




Kevin

how to start from varible row
 
Try this

Range("a" & p & ":b" & e).Select

You just had the column and row mixed up for the beginning
of the range.

KB

-----Original Message-----
Here is an example

p = 1
e = 5
Range(p & "a:b" & e).Select
if p is a variable row and u would want to start a
selection from colum 'a', microsoft will not accept the
above statement, only the 'b" & e' part works.

help, urgently please

thank u
.



All times are GMT +1. The time now is 03:50 AM.

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