Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to sum numeric values of column (variable length) in 1st available blank cell
Hi, I have an invoice summariser xl document which takes the contents of folder (ie. a quarter) and summaries the invoice contained in. As th quarters can have variable numbers of invoices, I'd like to add function which looks for the ist blank row in a given column (or an column with numeric values if thats easier) and then totals it. should imagine that this would be fairly easy, and a common requiremen but I have been unable to find the appropriate code. If anyone can help me out this would be much apprecciated. Thanks in advance And -- grimji ----------------------------------------------------------------------- grimjim's Profile: http://www.excelforum.com/member.php...fo&userid=1539 View this thread: http://www.excelforum.com/showthread.php?threadid=27009 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to sum numeric values of column (variable length) in 1st available blank cell
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sum a Column of Variable length | Excel Discussion (Misc queries) | |||
Sum a column of variable length? | Excel Discussion (Misc queries) | |||
Using a Macro to Sum a Variable-Length Range (a Column) | Excel Programming | |||
Using a Macro to Sum a Variable-Length Range (a Column) | Excel Programming | |||
Averaging a variable length column | Excel Programming |