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! |
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 |
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! |
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! |
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