ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   sum if - month question (https://www.excelbanter.com/excel-discussion-misc-queries/122719-sum-if-month-question.html)

paula k

sum if - month question
 
I am using the following formula (and it works!) to calculate the number of
dates that equal january, feb, and so on.

=SUMPRODUCT(--(MONTH('Raw Data'!H$4:H$18)=1))

Within the raw data, I also have the word "unscheduled" where a date should
belong. I am now getting errors with my formula. How do I add - if the cell
doesn't = unscheduled, then sum product?

Thanks!!

T. Valko

sum if - month question
 
One way:

=SUMPRODUCT(--(TEXT('Raw Data'!H4:H18,"mmm")="Jan"))

Biff

"paula k" wrote in message
...
I am using the following formula (and it works!) to calculate the number of
dates that equal january, feb, and so on.

=SUMPRODUCT(--(MONTH('Raw Data'!H$4:H$18)=1))

Within the raw data, I also have the word "unscheduled" where a date
should
belong. I am now getting errors with my formula. How do I add - if the
cell
doesn't = unscheduled, then sum product?

Thanks!!




Bob Phillips

sum if - month question
 
Try this

=SUM(IF(ISNUMBER(H$4:H$18),IF(MONTH(H$4:H$18),1)))

as an array formula, commit with Ctrl-Shift-Enter rather than just Enter

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"paula k" wrote in message
...
I am using the following formula (and it works!) to calculate the number of
dates that equal january, feb, and so on.

=SUMPRODUCT(--(MONTH('Raw Data'!H$4:H$18)=1))

Within the raw data, I also have the word "unscheduled" where a date
should
belong. I am now getting errors with my formula. How do I add - if the
cell
doesn't = unscheduled, then sum product?

Thanks!!




Dave Peterson

sum if - month question
 
One way:

=SUM(IF(ISNUMBER('Raw Data'!H$4:H$18),--(MONTH('Raw Data'!H$4:H$18)=1)))

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

paula k wrote:

I am using the following formula (and it works!) to calculate the number of
dates that equal january, feb, and so on.

=SUMPRODUCT(--(MONTH('Raw Data'!H$4:H$18)=1))

Within the raw data, I also have the word "unscheduled" where a date should
belong. I am now getting errors with my formula. How do I add - if the cell
doesn't = unscheduled, then sum product?

Thanks!!


--

Dave Peterson


All times are GMT +1. The time now is 12:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com