View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default sum a column, but only for specific rows

Hi Andrew
if you can also use a solution without VBa try the SUMIF function
=SUMIF(Invoice_Range,Invoice_reference,Amount_Rang e)
have a look at
http://j-walk.com/ss/excel/tips/tip74.htm
and
http://j-walk.com/ss/excel/tips/tip52.htm

HTH
Frank

Andrew wrote:
I want to set up a spreadsheet to sum only certain rows.

I have a list of orders (One on each row), but only some have
invoices. I would like to go through the rows and produce two sums:
One would be the sum for rows with invoices, the other for rows
without invoivces.

(The invoice reference is in one column, the ammount is in another
column)

I am trying to write a module, but am new to VB.

Thanks in advance.

Andrew