#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 68
Default SumIf Function

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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default SumIf Function

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

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



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
How to nest a left function within a sumif function? LisaK Excel Worksheet Functions 2 April 23rd 23 11:46 AM
Using the TODAY() function in a SUMIF function JPB Excel Worksheet Functions 4 July 27th 06 04:01 PM
SUMIF Function Inside SUMPRODUCT Function Abdul Waheed Excel Worksheet Functions 17 September 19th 05 04:24 PM
Can SUMIF function include AND function ShaneS Excel Worksheet Functions 1 May 17th 05 03:24 AM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM


All times are GMT +1. The time now is 06:11 AM.

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"