ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Referencing a Range (https://www.excelbanter.com/excel-programming/332029-referencing-range.html)

Sanj

Referencing a Range
 
I have in the past referenced ranges in the following way
rng = range(cells(a,b),cells(c,d))
The reason I do it this way is that I know the first cell, I don't know the
last. The "A1" reference does not work for that, unless I were to build the
string on the fly, which seems to be an unnecessary pain.

Problem: this way of refencing a range if very flaky, I get all sorts of
weird errors

Any thoughts?


Norman Jones

Referencing a Range
 
Hi Sanj,

What sort of weird errors in what circumstances?

Can you give an example which can be reproduced?


---
Regards,
Norman



"Sanj" wrote in message
...
I have in the past referenced ranges in the following way
rng = range(cells(a,b),cells(c,d))
The reason I do it this way is that I know the first cell, I don't know
the
last. The "A1" reference does not work for that, unless I were to build
the
string on the fly, which seems to be an unnecessary pain.

Problem: this way of refencing a range if very flaky, I get all sorts of
weird errors

Any thoughts?





All times are GMT +1. The time now is 08:51 PM.

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