Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
T2B T2B is offline
external usenet poster
 
Posts: 3
Default Row and column count last occupied cells in range

In VBA for a named range, I need to return:

row count, last occupied cell
column count, last occupied cell

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 587
Default Row and column count last occupied cells in range

hi,

rw = Evaluate("MAX(IF(" & [rng].Address & "<"""",row(" & [rng].Address & ")))")
cmn = Evaluate("MAX(IF(" & [rng].Address & "<"""",column(" & [rng].Address & ")))")


--
isabelle



Le 2012-04-28 08:21, T2B a écrit :
In VBA for a named range, I need to return:

row count, last occupied cell
column count, last occupied cell

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
TG TG is offline
external usenet poster
 
Posts: 8
Default Row and column count last occupied cells in range

r = activesheet.usedrange,row
c = activesheet.usedrange.column

/Tommy

On 28 Apr., 16:11, isabelle wrote:
hi,

rw = Evaluate("MAX(IF(" & [rng].Address & "<"""",row(" & [rng].Address & ")))")
cmn = Evaluate("MAX(IF(" & [rng].Address & "<"""",column(" & [rng].Address & ")))")

--
isabelle

Le 2012-04-28 08:21, T2B a écrit :







In VBA for a named range, I need to return:


row count, last occupied cell
column count, last occupied cell


Thanks.


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
Count cells in column that contain number in a range az willie Excel Worksheet Functions 9 December 12th 08 07:35 PM
Find next occupied row up in another column Greg Lovern Excel Worksheet Functions 9 November 17th 07 03:19 AM
Excel, how to count every 4th cell in column to see if occupied? Ashley Excel Worksheet Functions 4 July 19th 06 07:27 PM
how to count the number of occupied columns in a sheet? Mark Stephens[_3_] Excel Programming 1 May 28th 06 06:34 PM
Count cells based on date range in another column [email protected] New Users to Excel 1 May 5th 05 08:11 PM


All times are GMT +1. The time now is 05:26 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"