Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to find out how many rows do my collumn have?

Hi!

I have to find out how many rows do my collumn have.
Can enyone give me som VB solution?

I tried:
Range.Rows.Count byt then I obtain 65K
and
Range.Parent.UsedRange

any others propositions??

Thanx in advice Leon!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default How to find out how many rows do my collumn have?

Hi Leon,

I don't know how to do it with VBA but you can do it by a cell in excel and you will put in your program
dim nbrofrow as integer
Range("a1").select
activecell.formulaR1C1="=count(B:B)" 'or countif(C:C,1,B:B)....
nbrofrow = range("a1").value
I hope this will help you...
Merry christmas
Benjamin
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to find out how many rows do my collumn have?

With Activesheet.usedrange
msgbox .Rows.count
End With

for a specific column

set rng = Range(cells(1,"C"),cells(rows.count,"C").End(xlup) )
msgbox rng.rows.count

--
Regards,
Tom Ogilvy



"Leon" wrote in message ...
Hi!

I have to find out how many rows do my collumn have.
Can enyone give me som VB solution?
I tried:
Range.Rows.Count byt then I obtain 65K
and
Range.Parent.UsedRange

any others propositions??

Thanx in advice Leon!




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default How to find out how many rows do my collumn have?

Sub countrows()
MsgBox Cells(Rows.Count, "c").End(xlUp).Row
'or
'MsgBox Cells(Rows.Count, activecell.column).End(xlUp).Row
End Sub

--
Don Guillett
SalesAid Software

"Leon" wrote in message ...
Hi!

I have to find out how many rows do my collumn have.
Can enyone give me som VB solution?

I tried:
Range.Rows.Count byt then I obtain 65K
and
Range.Parent.UsedRange

any others propositions??

Thanx in advice Leon!




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to find out how many rows do my collumn have?


Użytkownik "Leon" napisał w wiadomo¶ci
...
Hi!

I have to find out how many rows do my collumn have.
Can enyone give me som VB solution?

I tried:
Range.Rows.Count byt then I obtain 65K
and
Range.Parent.UsedRange

any others propositions??

Thanx in advice Leon!



Thanx both of you!!

Leon!


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
Get data from specific collumn KT Excel Worksheet Functions 4 September 26th 08 12:28 PM
look up and return data in collumn Aaron Excel Discussion (Misc queries) 1 April 21st 07 11:28 PM
counting if data from one collumn is present in another collumn Amelia Excel Worksheet Functions 1 February 8th 07 10:05 PM
looking for a value in a collumn exceluser2 Excel Worksheet Functions 5 February 8th 06 11:53 PM
Looking up data within a collumn Demitre Excel Discussion (Misc queries) 3 December 21st 05 01:08 AM


All times are GMT +1. The time now is 12:56 AM.

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"