Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default HELP WITH SUMPRODUCT FORMULA USING YEAR() and MONTH() FUNCTIONS

I need some help with this formular. I am trying to figure our how to count
how many cells in a date column has May has the month and 2008 as the year.
Hence the
"--(MONTH('InSite Milestones'!$H$8:$H$7732)=MONTH(D$3)))),--(YEAR('InSite
Milestones'!$H$8:$H$7732)=YEAR(D$3))" in the formular below. But I am get
#VALUE! error for MONTH('InSite Milestones'!$H$8:$H$7732) and YEAR('InSite
Milestones'!$H$8:$H$7732), any ideas?

=(SUMPRODUCT(--('InSite Milestones'!$B$8:$B$7732=$B4),--('InSite
Milestones'!$D$8:$D$7732=$C4),--(MONTH('InSite
Milestones'!$H$8:$H$7732)=MONTH(D$3)),--(YEAR('InSite
Milestones'!$H$8:$H$7732)=YEAR(D$3))))
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default HELP WITH SUMPRODUCT FORMULA USING YEAR() and MONTH() FUNCTIONS


Try this

= Sum(if(Text([Range]<"MMMYYYY") = "May2008",1,0))

but instead of pressing return pressing return once you have completed your
formula - you need to press Sht+Ctrl+Rtn

This will put {} brackets around the formula to show it is an array formula...

However - please note - in the range you can't put "E:E" it needs to be
defined.. so "E1:E4000"

HTH
Rob
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default HELP WITH SUMPRODUCT FORMULA USING YEAR() and MONTH() FUNCTIONS

Do you have any text in any of those ranges (h8:h7732 or D3)???

=month() and =year() will both result in that #value! error if you do.

(Do you have headers in row 8????)

Ayo wrote:

I need some help with this formular. I am trying to figure our how to count
how many cells in a date column has May has the month and 2008 as the year.
Hence the
"--(MONTH('InSite Milestones'!$H$8:$H$7732)=MONTH(D$3)))),--(YEAR('InSite
Milestones'!$H$8:$H$7732)=YEAR(D$3))" in the formular below. But I am get
#VALUE! error for MONTH('InSite Milestones'!$H$8:$H$7732) and YEAR('InSite
Milestones'!$H$8:$H$7732), any ideas?

=(SUMPRODUCT(--('InSite Milestones'!$B$8:$B$7732=$B4),--('InSite
Milestones'!$D$8:$D$7732=$C4),--(MONTH('InSite
Milestones'!$H$8:$H$7732)=MONTH(D$3)),--(YEAR('InSite
Milestones'!$H$8:$H$7732)=YEAR(D$3))))


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 320
Default HELP WITH SUMPRODUCT FORMULA USING YEAR() and MONTH() FUNCTIONS

I'm guessing that somewhere in your range of cells B8:B7732 or D or H
already contains a #VALUE! error somewhere.
You can find these & fix/clear them and the formula should work.
Bob Umlas
Excel MVP

"Ayo" wrote in message
...
I need some help with this formular. I am trying to figure our how to
count
how many cells in a date column has May has the month and 2008 as the
year.
Hence the
"--(MONTH('InSite Milestones'!$H$8:$H$7732)=MONTH(D$3)))),--(YEAR('InSite
Milestones'!$H$8:$H$7732)=YEAR(D$3))" in the formular below. But I am get
#VALUE! error for MONTH('InSite Milestones'!$H$8:$H$7732) and YEAR('InSite
Milestones'!$H$8:$H$7732), any ideas?

=(SUMPRODUCT(--('InSite Milestones'!$B$8:$B$7732=$B4),--('InSite
Milestones'!$D$8:$D$7732=$C4),--(MONTH('InSite
Milestones'!$H$8:$H$7732)=MONTH(D$3)),--(YEAR('InSite
Milestones'!$H$8:$H$7732)=YEAR(D$3))))



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default HELP WITH SUMPRODUCT FORMULA USING YEAR() and MONTH() FUNCTIONS

=SUMPRODUCT(--('InSite Milestones'!$B$8:$B$7732=$B4),
--('InSite Milestones'!$D$8:$D$7732=$C4),
--(MONTH('InSite Milestones'!$H$8:$H$7732)=MONTH(D$3)),
--(YEAR('InSite Milestones'!$H$8:$H$7732)=YEAR(D$3)))

If this post helps click Yes
---------------
Jacob Skaria


"Ayo" wrote:

I need some help with this formular. I am trying to figure our how to count
how many cells in a date column has May has the month and 2008 as the year.
Hence the
"--(MONTH('InSite Milestones'!$H$8:$H$7732)=MONTH(D$3)))),--(YEAR('InSite
Milestones'!$H$8:$H$7732)=YEAR(D$3))" in the formular below. But I am get
#VALUE! error for MONTH('InSite Milestones'!$H$8:$H$7732) and YEAR('InSite
Milestones'!$H$8:$H$7732), any ideas?

=(SUMPRODUCT(--('InSite Milestones'!$B$8:$B$7732=$B4),--('InSite
Milestones'!$D$8:$D$7732=$C4),--(MONTH('InSite
Milestones'!$H$8:$H$7732)=MONTH(D$3)),--(YEAR('InSite
Milestones'!$H$8:$H$7732)=YEAR(D$3))))



  #6   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default HELP WITH SUMPRODUCT FORMULA USING YEAR() and MONTH() FUNCTIONS

Thanks guys. I figured it out. The problem was blanks in the column H
because I was using a Vlookup formular in that column.

"Ayo" wrote:

I need some help with this formular. I am trying to figure our how to count
how many cells in a date column has May has the month and 2008 as the year.
Hence the
"--(MONTH('InSite Milestones'!$H$8:$H$7732)=MONTH(D$3)))),--(YEAR('InSite
Milestones'!$H$8:$H$7732)=YEAR(D$3))" in the formular below. But I am get
#VALUE! error for MONTH('InSite Milestones'!$H$8:$H$7732) and YEAR('InSite
Milestones'!$H$8:$H$7732), any ideas?

=(SUMPRODUCT(--('InSite Milestones'!$B$8:$B$7732=$B4),--('InSite
Milestones'!$D$8:$D$7732=$C4),--(MONTH('InSite
Milestones'!$H$8:$H$7732)=MONTH(D$3)),--(YEAR('InSite
Milestones'!$H$8:$H$7732)=YEAR(D$3))))

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
SumProduct by specific weeks of the month or year BLUV Excel Programming 2 February 12th 09 08:55 PM
SumProduct by specific weeks of the month or year BLUV Excel Programming 0 February 12th 09 08:03 PM
sumproduct by criteria, month, & year Eric M. Excel Worksheet Functions 4 February 25th 08 08:26 PM
SUMPRODUCT - Exclude LAST Row of Matched Criteria (Month & Year) Sam via OfficeKB.com Excel Worksheet Functions 10 January 8th 07 07:03 PM
sumproduct for month and year Benjamin Excel Discussion (Misc queries) 1 September 20th 06 04:29 PM


All times are GMT +1. The time now is 02:56 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"