ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Range with numerical data (https://www.excelbanter.com/excel-programming/335061-range-numerical-data.html)

Moises

Range with numerical data
 

What would be the correct code for the following range :

Range A12:D24

count1= 12
count2=24

I am writing the following , but it does not work :
Range ( "A & count1 : D" & count2).Select

Thanks,

Moises

Ron de Bruin

Range with numerical data
 
Use this

Range("A" & count1 & ":D" & count2).Select



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Moises" wrote in message ...

What would be the correct code for the following range :

Range A12:D24

count1= 12
count2=24

I am writing the following , but it does not work :
Range ( "A & count1 : D" & count2).Select

Thanks,

Moises




Bob Phillips[_6_]

Range with numerical data
 
Almost there!

Range ( "A & count1 & ": D" & count2).Select


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Moises" wrote in message
...

What would be the correct code for the following range :

Range A12:D24

count1= 12
count2=24

I am writing the following , but it does not work :
Range ( "A & count1 : D" & count2).Select

Thanks,

Moises





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

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