ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Simple range reference question? (https://www.excelbanter.com/excel-programming/292695-simple-range-reference-question.html)

mike

Simple range reference question?
 
Hi.

I am struggling with how to refer to a range by using
column and row numbers.

I have an integer variable, myColumn, that stores the
column number I would like to start from and endRow, an
integer variable that stores the last row. I would like
the range to start from Row1, mycolumn to row endRow, and
4 columns to the right of myColumn.

Can someone help me complete the myRange statment:

set myRange =

Thanks,
Mike.


Bob Phillips[_6_]

Simple range reference question?
 
Range(Cells(1,myColumn),Cells(endRow,myColumn))

--

HTH

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

"Mike" wrote in message
...
Hi.

I am struggling with how to refer to a range by using
column and row numbers.

I have an integer variable, myColumn, that stores the
column number I would like to start from and endRow, an
integer variable that stores the last row. I would like
the range to start from Row1, mycolumn to row endRow, and
4 columns to the right of myColumn.

Can someone help me complete the myRange statment:

set myRange =

Thanks,
Mike.




mike

Simple range reference question?
 
Thanks, Bob!


-----Original Message-----
Range(Cells(1,myColumn),Cells(endRow,myColumn))

--

HTH

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

"Mike" wrote in

message
...
Hi.

I am struggling with how to refer to a range by using
column and row numbers.

I have an integer variable, myColumn, that stores the
column number I would like to start from and endRow, an
integer variable that stores the last row. I would

like
the range to start from Row1, mycolumn to row endRow,

and
4 columns to the right of myColumn.

Can someone help me complete the myRange statment:

set myRange =

Thanks,
Mike.



.


Nigel[_6_]

Simple range reference question?
 
myRange = Range(Cells(1, myColumn), Cells(endRow, myColumn+4))


"Mike" wrote in message
...
Hi.

I am struggling with how to refer to a range by using
column and row numbers.

I have an integer variable, myColumn, that stores the
column number I would like to start from and endRow, an
integer variable that stores the last row. I would like
the range to start from Row1, mycolumn to row endRow, and
4 columns to the right of myColumn.

Can someone help me complete the myRange statment:

set myRange =

Thanks,
Mike.





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

brad

Simple range reference question?
 
Set myRange = Range(Cells(1, myColumn), Cells(endRow,
myColumn + 4))

HTH.

-Brad

-----Original Message-----
Hi.

I am struggling with how to refer to a range by using
column and row numbers.

I have an integer variable, myColumn, that stores the
column number I would like to start from and endRow, an
integer variable that stores the last row. I would like
the range to start from Row1, mycolumn to row endRow, and
4 columns to the right of myColumn.

Can someone help me complete the myRange statment:

set myRange =

Thanks,
Mike.

.


Alan Beban[_4_]

Simple range reference question?
 
Set rng=range("A1")
set myRange=Range(rng(1,myColumn),rng(endRow, myColumn+4)

Alan Beban

Mike wrote:
Hi.

I am struggling with how to refer to a range by using
column and row numbers.

I have an integer variable, myColumn, that stores the
column number I would like to start from and endRow, an
integer variable that stores the last row. I would like
the range to start from Row1, mycolumn to row endRow, and
4 columns to the right of myColumn.

Can someone help me complete the myRange statment:

set myRange =

Thanks,
Mike.



Alan Beban[_4_]

Simple range reference question?
 
Whoops! the following needs a closing parenthesis. Sorry.

Alan Beban

Alan Beban wrote:
Set rng=range("A1")
set myRange=Range(rng(1,myColumn),rng(endRow, myColumn+4)

Alan Beban

Mike wrote:

Hi.

I am struggling with how to refer to a range by using column and row
numbers.

I have an integer variable, myColumn, that stores the column number I
would like to start from and endRow, an integer variable that stores
the last row. I would like the range to start from Row1, mycolumn to
row endRow, and 4 columns to the right of myColumn.

Can someone help me complete the myRange statment:

set myRange =
Thanks,
Mike.





All times are GMT +1. The time now is 02:24 PM.

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