View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default returning value if month is January

Why not use SUMIF function?
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Die_Another_Day" wrote in message
oups.com...
Try these array formulas, I'm sure that SumProduct could do it but I
suck at using SumProduct.

1. =SUM(IF(MONTH(F2:F1000)=1,1,0))
2. =SUM(IF(MONTH(F2:F1000)=1,M2:1000,0))

Make sure to press Ctrl+Shift+Enter after entering the formula into the
cell

Charles

jermsalerms wrote:
I have a list of data (1000 rows).
Each row has several columns containing information on a given
transaction.

column F contains the date of the transaction (mm/dd/yyyy format.)
column M contains a dollar amount.

I have two formulas that I need to make that i am not sure how to
handle.

1. I want formula that will count all the cells in column F that have a
month of January and give me a total for the number of rows that contain
this. I tried: =COUNTIF(F2:F1000,MONTH(1)) but it did not work.

2. I want a formula that will add up the sum ($) of all the cells in
column M if the month in column F is January.


--
jermsalerms
------------------------------------------------------------------------
jermsalerms's Profile:
http://www.excelforum.com/member.php...o&userid=30167
View this thread:
http://www.excelforum.com/showthread...hreadid=573187