ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to find out how many rows do my collumn have? (https://www.excelbanter.com/excel-programming/285854-how-find-out-how-many-rows-do-my-collumn-have.html)

Leon[_3_]

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!



ben.c

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

Tom Ogilvy

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!





Don Guillett[_4_]

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!





Leon[_3_]

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!




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

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