![]() |
nomber of lines
I have a sheet in excel and i want to know how many lines are "used (used line = there is cell(s) with something in it). How can i do that in Macro-VBA ? What is the "simplies(rapid) way"? don't want to use a for, while or somethig like that -- wasss ----------------------------------------------------------------------- wasssu's Profile: http://www.excelforum.com/member.php...fo&userid=1605 View this thread: http://www.excelforum.com/showthread.php?threadid=27731 |
nomber of lines
wasssu
Sub CountNonBlankCells() Dim mycount As Integer mycount = Application.CountA(Selection) MsgBox "The number of non-blank cell(s) in this selection is : " _ & mycount, vbInformation, "Count Cells" End Sub Gord Dibben Excel MVP On Thu, 11 Nov 2004 04:22:42 -0600, wasssu wrote: I have a sheet in excel and i want to know how many lines are "used" (used line = there is cell(s) with something in it). How can i do that in Macro-VBA ? What is the "simplies(rapid) way"? I don't want to use a for, while or somethig like that. |
nomber of lines
GetBottomRow = TheSheet.Cells.Find(What:="*", SearchOrder:=xlByRows, _ SearchDirection:=xlPrevious).Row LastColumn = TheSheet.Cells.Find(What:="*", SearchOrder:=xlByColumns _ SearchDirection:=xlPrevious).Colum -- mudrake ----------------------------------------------------------------------- mudraker's Profile: http://www.excelforum.com/member.php...nfo&userid=247 View this thread: http://www.excelforum.com/showthread.php?threadid=27731 |
All times are GMT +1. The time now is 05:31 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com