this will count everything even no. which are used for rough work.
lets us know what exactly u want by sending ur workbook.
a = WorksheetFunction.CountA(Sheet1.UsedRange)
From: Jitendra Verma
To: excel-macros@googlegroups.com
Sent: Wed, 26 January, 2011 11:
Dear Jitendra,
Simply palce the cursor in any other worksheet.
for example if you want to count the number of nonblank cells in sheet1,
just place the cursor anywhere in sheet2 and =COUNTA(Sheet1!1:65536)
Thanks & Regards
Thamu
On Wed, Jan 26, 2011 at 11:43 PM, Dilip Pandey wrote:
> Hi Jit
Hi Jitendra,
Not sure how you have arranged the data into your worksheet, but try
below code:-
Sub lastRec()
i = Range("a65536").End(xlUp).Row
MsgBox i-1 'subtract one from i if you have the headers at top
End Sub
To count non blank cells in a worksheet, you can use COUNTA function.
Please ge