$$Excel-Macros$$ Re: Need help with VBA Macro...

2009-03-06 Thread Dave Bonallack
Hi If you know the maximum possible range of your data, say A1:A1000, RowCount = Application.WorksheetFunction.CountA(Range("A1:A1000")) The RowCount variable is the number of rows that are filled with data. Regards - Dave. Date: Sat, 7 Mar 2009 06:01:24 +0530 Subject: $$Excel-Macros$$ Need he

$$Excel-Macros$$ Re: Need help with VBA Macro...

2009-03-06 Thread Peter Jorgensen
There are a few ways that you can do it. The first is to start with the first row and find the last populated row. Assuming data with every row filled, you could do something like: iNumberRows = Range("A6").End(xlDown).Row - Range("A6").Row In this case, it assumes your data starts in A6, s

$$Excel-Macros$$ Re: Need help with VBA Macro...

2009-03-06 Thread Paul Schreiner
I use: Rowcnt = Application.worksheetfunction.counta(range("A1:A65000")) this will give you the number of cells in column A that contain data. Paul From: Ashkaran Badlani To: excel-macros@googlegroups.com Sent: Friday, March 6, 2009 7:31:24 PM Subject: $$Excel