Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default How to obtain the shortest range that encloses all the non empty cells?

Faustino,

The UsedRange property will return the range of cells, from
top-left to bottom-right, that are used. E.g.,

MsgBox ActiveSheet.UsedRange.Address


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"faustino Dina" wrote in message
...
Hi,

How to obtain the range in which cells are defined? I mean, the

Sheet has a
huge number of rows and columns but you use a few of them.

Suppose you fill
the cells D20 and H40, and all others are untouched. I need to

obtain the
range (D20:H40) How can I do that without scanning all the

universe of
cells...?

Thanks in advance
Faustino




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default How to obtain the shortest range that encloses all the non empty cells?

Hi,

How to obtain the range in which cells are defined? I mean, the Sheet has a
huge number of rows and columns but you use a few of them. Suppose you fill
the cells D20 and H40, and all others are untouched. I need to obtain the
range (D20:H40) How can I do that without scanning all the universe of
cells...?

Thanks in advance
Faustino


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default How to obtain the shortest range that encloses all the non empty cells?

Thanks for all Chip,
Can you point me to some links for introducing Excel Object model (and Excel
way of thinking) for Visual Basic programmers (I mean structured and OO
programmers)? I feel I don't have yet the BIG picture of the Excel as a
powerful UI tool for programmers...

Thanks again
Faustino

"Chip Pearson" wrote in message
...
Faustino,

The UsedRange property will return the range of cells, from
top-left to bottom-right, that are used. E.g.,

MsgBox ActiveSheet.UsedRange.Address


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"faustino Dina" wrote in message
...
Hi,

How to obtain the range in which cells are defined? I mean, the

Sheet has a
huge number of rows and columns but you use a few of them.

Suppose you fill
the cells D20 and H40, and all others are untouched. I need to

obtain the
range (D20:H40) How can I do that without scanning all the

universe of
cells...?

Thanks in advance
Faustino






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I average a range which also contains empty cells Tom Excel Discussion (Misc queries) 3 October 30th 09 07:57 PM
delete all empty cells in a range Gary Excel Worksheet Functions 2 February 8th 07 09:09 PM
Checking for empty cells in a range Chris Strug Excel Worksheet Functions 2 June 20th 05 10:33 AM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 0 April 7th 05 12:47 AM
sum next two non-empty cells in a range Spencer Hutton Excel Worksheet Functions 1 January 9th 05 11:29 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"