ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Selecting all Cells with Data? (https://www.excelbanter.com/excel-programming/280372-selecting-all-cells-data.html)

dave

Selecting all Cells with Data?
 

I'm writing a VB app to read an excel file that contains a data table. My
goal is to obtain all the column headings and corresponding cell values for
each column in the table.

Is there a simple method available to select a range of cells containing the
data? Other than looping through, and testing each cell...

One sheet may contain data from A1 through K25, and another perhaps from A1
to M15. It'd be nice to use an object method to return the Range A1:K25 in
the first case, and A1:M15 in the other.

Any ideas?

Dave






Mike Fogleman

Selecting all Cells with Data?
 
Sheet1.UsedRange

Mike
"dave" wrote in message
...

I'm writing a VB app to read an excel file that contains a data table. My
goal is to obtain all the column headings and corresponding cell values

for
each column in the table.

Is there a simple method available to select a range of cells containing

the
data? Other than looping through, and testing each cell...

One sheet may contain data from A1 through K25, and another perhaps from

A1
to M15. It'd be nice to use an object method to return the Range A1:K25

in
the first case, and A1:M15 in the other.

Any ideas?

Dave








dave

Selecting all Cells with Data?
 

Thanks much.


"Mike Fogleman" wrote in message
...
Sheet1.UsedRange

Mike
"dave" wrote in message
...

I'm writing a VB app to read an excel file that contains a data table.

My
goal is to obtain all the column headings and corresponding cell values

for
each column in the table.

Is there a simple method available to select a range of cells containing

the
data? Other than looping through, and testing each cell...

One sheet may contain data from A1 through K25, and another perhaps from

A1
to M15. It'd be nice to use an object method to return the Range A1:K25

in
the first case, and A1:M15 in the other.

Any ideas?

Dave











All times are GMT +1. The time now is 04:34 PM.

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