Thread: SumIf Function
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default SumIf Function

One way:

=SUMPRODUCT(--(YEAR(A1:A100)=2008),B1:B100)


--
Biff
Microsoft Excel MVP


"Amber" wrote in message
...
I have a spreadsheet that contains two columns, one is the date (m/yyyy
format) and the other contains cost associated with the date. I would
like
to have a running total by year of the associated cost entered for that
date.
So when I enter in a new date/cost, (ie: 4/2008, cost=$1200) my 'total'
cell
for 2008 would then add this new cost in.

I know there is a way to do this, just am stumped as to how. I'm thinking
I
would use the 'sumif' function? If anyone can tell me what my formula
would
be, I would appreciate the help.