Is there a way to refer to a range of cells completely by variables:
Range((A,B), (C,D))
where A, B, C and D are integer variables
any help would be appreciated
thanks
Is there a way to refer to a range of cells completely by variables:
Range((A,B), (C,D))
where A, B, C and D are integer variables
any help would be appreciated
thanks
Matt,
The following code will select B1:D3
Dim A As Integer: A = 1
Dim B As Integer: B = 2
Dim C As Integer: C = 3
Dim D As Integer: D = 4
Range(Cells(A, B), Cells(C, D)).Select
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Matt" <[email protected]> wrote in message
news:[email protected]...
> Is there a way to refer to a range of cells completely by
> variables:
> Range((A,B), (C,D))
> where A, B, C and D are integer variables
>
> any help would be appreciated
> thanks
>
Thanks, exactly what I was looking for (should have guessed it would be
as simple as putting Cells in, must be a long day for me already)
Thanks, exactly what I was looking for (should have guessed it would be
as simple as putting Cells in, must be a long day for me already)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks