Andy
To get the blank cell at the bottom of your data, have a look at this
http://www.dicks-blog.com/excel/2004...tnextcell.html
Then to sum that column, you can do"
Dim Rng as Rng
Set Rng = GetNextCell(1,Sheet1,False)
MsgBox Application.Sum(Sheet1.Cells(1,Rng.Column),Rng)
If all the cells are blank below your data, you could just sum the whole
column
MsgBox Application.Sum(Sheet1.Columns(1).Value)
--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com
"grimjim" wrote in message
...
Hi,
I have an invoice summariser xl document which takes the contents of a
folder (ie. a quarter) and summaries the invoice contained in. As the
quarters can have variable numbers of invoices, I'd like to add a
function which looks for the ist blank row in a given column (or any
column with numeric values if thats easier) and then totals it. I
should imagine that this would be fairly easy, and a common requirement
but I have been unable to find the appropriate code.
If anyone can help me out this would be much apprecciated.
Thanks in advance
Andy
--
grimjim
------------------------------------------------------------------------
grimjim's Profile:
http://www.excelforum.com/member.php...o&userid=15394
View this thread: http://www.excelforum.com/showthread...hreadid=270099