Yussi Ariefiyono
Count rows in excel vb
problem:
we want to count number of rows in excel with VB
solution:
I create the sub function to count the number of rows depend on where do you want to start!
Sub countRows()RowCount = 0RowNext = 22 ( please change the starting row according to your need)Do While Cells(RowNext, 3).Value <> 0 ( the “3″ also need to be changed)RowCount = RowCount + 1RowNext = RowNext + 1Loop‘MsgBox RowCountEnd Sub
| Print article | This entry was posted by yussi ariefiyono on June 25, 2010 at 12:57 pm, and is filed under vb. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |