Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default UsedRange Count for each column

How can I get the .UsedRange count for each column in my sheet?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default UsedRange Count for each column

I think you would have to do it separately per column, like

Dim col As Range
For Each col In Columns("A:L")
Debug.Print Cells(Rows.Count, col.Column).End(xlUp).Row
Next col


--

HTH

RP
(remove nothere from the email address if mailing direct)


"HotRod" wrote in message
...
How can I get the .UsedRange count for each column in my sheet?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default UsedRange Count for each column

I'll give it a shot, I was using Worksheet("something").usedrange.rows and
then rng.count


"Bob Phillips" wrote in message
...
I think you would have to do it separately per column, like

Dim col As Range
For Each col In Columns("A:L")
Debug.Print Cells(Rows.Count, col.Column).End(xlUp).Row
Next col


--

HTH

RP
(remove nothere from the email address if mailing direct)


"HotRod" wrote in message
...
How can I get the .UsedRange count for each column in my sheet?






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default UsedRange Count for each column

WORKS Great THANKS


"HotRod" wrote in message
...
How can I get the .UsedRange count for each column in my sheet?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default UsedRange Count for each column

for i = 1 to 20
msgbox Columns(i).Address & " - " & application.CountA(Columns(i))
Next

--
Regards,
Tom Ogilvy

"HotRod" wrote in message
...
How can I get the .UsedRange count for each column in my sheet?






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default UsedRange Count for each column

But that would give you the rows of the largest column, not separate values.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"HotRod" wrote in message
...
I'll give it a shot, I was using Worksheet("something").usedrange.rows and
then rng.count


"Bob Phillips" wrote in message
...
I think you would have to do it separately per column, like

Dim col As Range
For Each col In Columns("A:L")
Debug.Print Cells(Rows.Count, col.Column).End(xlUp).Row
Next col


--

HTH

RP
(remove nothere from the email address if mailing direct)


"HotRod" wrote in message
...
How can I get the .UsedRange count for each column in my sheet?








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default UsedRange Count for each column

Bob what you gave me worked great. THANKS it was easier that I even expected
to implement this way.


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default UsedRange Count for each column

Good news HotRod.

Regards

Bob


"HotRod" wrote in message
...
Bob what you gave me worked great. THANKS it was easier that I even

expected
to implement this way.




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
Hide Column If Usedrange of Column ISBLANK Follow-up [email protected] Excel Discussion (Misc queries) 1 April 12th 09 10:00 PM
Hide Column If Usedrange of Column ISBLANK [email protected] Excel Discussion (Misc queries) 4 April 12th 09 09:47 PM
Real Value of .UsedRange.Rows.Count dazman Excel Worksheet Functions 2 August 25th 05 03:24 PM
Wrong result returned by UsedRange.Rows.Count j[_4_] Excel Programming 3 June 20th 05 09:03 PM
Problem with UsedRange.Rows.Count alainB[_15_] Excel Programming 4 April 29th 04 10:29 PM


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