Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum a Column of Variable length Chris G Excel Discussion (Misc queries) 4 November 7th 05 12:25 PM
Sum a column of variable length? Brian Excel Discussion (Misc queries) 5 February 3rd 05 02:26 PM
Using a Macro to Sum a Variable-Length Range (a Column) Chuckles123[_15_] Excel Programming 0 October 5th 04 06:46 AM
Using a Macro to Sum a Variable-Length Range (a Column) Chuckles123[_2_] Excel Programming 1 October 3rd 04 11:51 PM
Averaging a variable length column Doug[_10_] Excel Programming 1 June 22nd 04 07:48 PM


All times are GMT +1. The time now is 07:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"