SumIf Function

A

Amber

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.
 
T

Tyro

Formatting of an Excel date means nothing. An Excel date is a number. You
might want to read some documentation of Excel before using Excel.
You are confusing formatting with content. If I format my birthdate as
dd/mm/yy or yy/dd/mm, the date remains the same. You can format 1.33 as
1.3300000 or $0001.33 yet it is the same 1.33. Formatting is for human
consumption. Perhaps the Excel Bible series by John Walkenbach would be of
assistance to you. If you have entered your dates in Excel date format,
then =SUMPRODUCT(--(YEAR(A1:A50)=2008),B1:B50) if your dates are in column A
and your costs are in column B.
Good luck.

Tyro
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top