#1   Report Post  
Andy
 
Posts: n/a
Default Formula

I have the following formula input in order to bring back
the month and number of days:-
="CC"&D2&" month of "&TEXT(E2,"mmmm-yyyy")&" =
"&SUMPRODUCT(--(A2:A100=D2),--(MONTH(B2:B100=E2)=MONTH
(E2)),C2:C100)&" Days
"&SUMPRODUCT(--(A2:A100=D2),--(MONTH(B2:B100=F2)=MONTH
(F2)))&" occasions"

However it brings back 0 Month and 0 days even through
there are days and months in the cells.

Any help please.

from the above info i am going to try and insert a chart,
any help in this area would be appreciated
  #2   Report Post  
 
Posts: n/a
Default

Andy wrote...
I have the following formula input in order to bring back
the month and number of days:-


="CC"&D2&" month of "&TEXT(E2,"mmmm-yyyy")&" = "
&SUMPRODUCT(--(A2:A100=D2),--(MONTH(B2:B100=E2)=MONTH(E2)),
C2:C100)&" Days "
&SUMPRODUCT(--(A2:A100=D2),--(MONTH(B2:B100=F2)=MONTH(F2)))
&" occasions"

However it brings back 0 Month and 0 days even through
there are days and months in the cells.

....

The problem terms are

MONTH(B2:B100=E2)=MONTH(E2)

and

MONTH(B2:B100=F2)=MONTH(F2)

B2:B100=E2 will return an array of boolean (True/False) values, and
MONTH(TRUE) = MONTH(FALSE) = 1. If MONTH(E2) 1, then the terms above
will be arrays of all zeros; otherwise, arrays of all ones. In both
cases the results are likely to be incorrect.

Did you mean
MONTH(B2:B100)=MONTH(E2)

and

MONTH(B2:B100)=MONTH(F2)

respectively?

  #3   Report Post  
 
Posts: n/a
Default

Andy wrote...
I have the following formula input in order to bring back
the month and number of days:-


="CC"&D2&" month of "&TEXT(E2,"mmmm-yyyy")&" = "
&SUMPRODUCT(--(A2:A100=D2),--(MONTH(B2:B100=E2)=MONTH(E2)),
C2:C100)&" Days "
&SUMPRODUCT(--(A2:A100=D2),--(MONTH(B2:B100=F2)=MONTH(F2)))
&" occasions"

However it brings back 0 Month and 0 days even through
there are days and months in the cells.

....

The problem terms are

MONTH(B2:B100=E2)=MONTH(E2)

and

MONTH(B2:B100=F2)=MONTH(F2)

B2:B100=E2 will return an array of boolean (True/False) values, and
MONTH(TRUE) = MONTH(FALSE) = 1. If MONTH(E2) 1, then the terms above
will be arrays of all zeros; otherwise, arrays of all ones. In both
cases the results are likely to be incorrect.

Did you mean
MONTH(B2:B100)=MONTH(E2)

and

MONTH(B2:B100)=MONTH(F2)

respectively?

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
revert formula insertion to old method Don't be a pain in the ass Setting up and Configuration of Excel 0 January 24th 05 01:49 PM
Simple formula doesn't quite add up circeo Excel Discussion (Misc queries) 3 January 17th 05 09:04 PM
looking for a formula Amanda Excel Worksheet Functions 5 January 5th 05 07:37 AM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM


All times are GMT +1. The time now is 04:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"