A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sumproduct with mixed data?



 
 
Thread Tools Display Modes
  #1  
Old April 16th, 2010, 07:34 PM posted to microsoft.public.excel.worksheet.functions
gooders
external usenet poster
 
Posts: 7
Default Sumproduct with mixed data?

Hi, I have a column that is predominately filled with dates i.e. 1/12/2010;
16/4/2010 etc, and my formula below counted the number of rows based upon the
month and year of these dates, this worked well until now. Some fields within
the column now have text instead of a date and this has now messed up my
formula which returns a #value error. Any assistance you can give would be
greately appreciated.

Thanking you in advance.

=SUMPRODUCT(N(MONTH('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001)=3),N(YEAR('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001)=2010))

  #2  
Old April 16th, 2010, 08:16 PM posted to microsoft.public.excel.worksheet.functions
Joe User[_2_]
external usenet poster
 
Posts: 757
Default Sumproduct with mixed data?

"gooders" wrote:
Some fields within the column now have text instead
of a date and this has now messed up my formula which
returns a #value error.


Try:

=SUMPRODUCT(
(MONTH(N('C:\Users\[monitor.xls]Adjusting Output'!$A$3:$A$10001))=3)
*
(YEAR(N('C:\Users\[monitor.xls]Adjusting Output'!$A$3:$A$10001))=2010))

Alternatively:

=SUMPRODUCT(
--(MONTH(N('C:\Users\[monitor.xls]Adjusting Output'!$A$3:$A$10001))=3),
--(YEAR(N('C:\Users\[monitor.xls]Adjusting Output'!$A$3:$A$10001))=2010))

(Beware of line-wrap when you copy-and-paste into Excel.)

Note: MONTH(0) is 1 and YEAR(0) is 1900. That could give false positives
if you tested for that month and year. I doubt that will be a problem.


----- original message -----

"gooders" wrote:
Hi, I have a column that is predominately filled with dates i.e. 1/12/2010;
16/4/2010 etc, and my formula below counted the number of rows based upon the
month and year of these dates, this worked well until now. Some fields within
the column now have text instead of a date and this has now messed up my
formula which returns a #value error. Any assistance you can give would be
greately appreciated.

Thanking you in advance.

=SUMPRODUCT(N(MONTH('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001)=3),N(YEAR('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001)=2010))

  #3  
Old April 16th, 2010, 09:25 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Sumproduct with mixed data?

One way...

=SUMPRODUCT(--(TEXT('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001,"mmmyyyy")="Mar2010"))

--
Biff
Microsoft Excel MVP


"gooders" wrote in message
...
Hi, I have a column that is predominately filled with dates i.e.
1/12/2010;
16/4/2010 etc, and my formula below counted the number of rows based upon
the
month and year of these dates, this worked well until now. Some fields
within
the column now have text instead of a date and this has now messed up my
formula which returns a #value error. Any assistance you can give would
be
greately appreciated.

Thanking you in advance.

=SUMPRODUCT(N(MONTH('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001)=3),N(YEAR('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001)=2010))



  #4  
Old April 24th, 2010, 07:58 PM posted to microsoft.public.excel.worksheet.functions
gooders
external usenet poster
 
Posts: 7
Default Sumproduct with mixed data?

Thanks for your response but the formula isn't working for me. In the Text
formula it returns a value of 0 which is incorrect as there are definitely
Mar2010 dates.

In the other solution I get a #value error.

Thanks guys

"T. Valko" wrote:

One way...

=SUMPRODUCT(--(TEXT('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001,"mmmyyyy")="Mar2010"))

--
Biff
Microsoft Excel MVP


"gooders" wrote in message
...
Hi, I have a column that is predominately filled with dates i.e.
1/12/2010;
16/4/2010 etc, and my formula below counted the number of rows based upon
the
month and year of these dates, this worked well until now. Some fields
within
the column now have text instead of a date and this has now messed up my
formula which returns a #value error. Any assistance you can give would
be
greately appreciated.

Thanking you in advance.

=SUMPRODUCT(N(MONTH('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001)=3),N(YEAR('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001)=2010))



.

  #5  
Old April 25th, 2010, 03:49 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Sumproduct with mixed data?

In the Text formula it returns a value of 0

Hmmm...

Try this one:

=SUMPRODUCT(--('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001=DATE(2010,3,1)),--('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001=DATE(2010,3,31)))

--
Biff
Microsoft Excel MVP


"gooders" wrote in message
...
Thanks for your response but the formula isn't working for me. In the
Text
formula it returns a value of 0 which is incorrect as there are definitely
Mar2010 dates.

In the other solution I get a #value error.

Thanks guys

"T. Valko" wrote:

One way...

=SUMPRODUCT(--(TEXT('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001,"mmmyyyy")="Mar2010"))

--
Biff
Microsoft Excel MVP


"gooders" wrote in message
...
Hi, I have a column that is predominately filled with dates i.e.
1/12/2010;
16/4/2010 etc, and my formula below counted the number of rows based
upon
the
month and year of these dates, this worked well until now. Some fields
within
the column now have text instead of a date and this has now messed up
my
formula which returns a #value error. Any assistance you can give
would
be
greately appreciated.

Thanking you in advance.

=SUMPRODUCT(N(MONTH('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001)=3),N(YEAR('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001)=2010))



.



  #6  
Old April 25th, 2010, 09:26 AM posted to microsoft.public.excel.worksheet.functions
gooders
external usenet poster
 
Posts: 7
Default Sumproduct with mixed data?

Oh dear, I must apologise T. Valko. Your first formula does work. I
stupidly didn't include the -- into the formula. I thought that they
signified spaces and didn't appreciate that they were actually part of the
formula. Anyway, many thanks for your time and solving my problem for me.

Lesley

"T. Valko" wrote:

In the Text formula it returns a value of 0


Hmmm...

Try this one:

=SUMPRODUCT(--('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001=DATE(2010,3,1)),--('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001=DATE(2010,3,31)))

--
Biff
Microsoft Excel MVP


"gooders" wrote in message
...
Thanks for your response but the formula isn't working for me. In the
Text
formula it returns a value of 0 which is incorrect as there are definitely
Mar2010 dates.

In the other solution I get a #value error.

Thanks guys

"T. Valko" wrote:

One way...

=SUMPRODUCT(--(TEXT('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001,"mmmyyyy")="Mar2010"))

--
Biff
Microsoft Excel MVP


"gooders" wrote in message
...
Hi, I have a column that is predominately filled with dates i.e.
1/12/2010;
16/4/2010 etc, and my formula below counted the number of rows based
upon
the
month and year of these dates, this worked well until now. Some fields
within
the column now have text instead of a date and this has now messed up
my
formula which returns a #value error. Any assistance you can give
would
be
greately appreciated.

Thanking you in advance.

=SUMPRODUCT(N(MONTH('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001)=3),N(YEAR('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001)=2010))



.



.

  #7  
Old April 25th, 2010, 03:42 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default Sumproduct with mixed data?

Ok, good deal. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"gooders" wrote in message
...
Oh dear, I must apologise T. Valko. Your first formula does work. I
stupidly didn't include the -- into the formula. I thought that they
signified spaces and didn't appreciate that they were actually part of the
formula. Anyway, many thanks for your time and solving my problem for me.

Lesley

"T. Valko" wrote:

In the Text formula it returns a value of 0


Hmmm...

Try this one:

=SUMPRODUCT(--('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001=DATE(2010,3,1)),--('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001=DATE(2010,3,31)))

--
Biff
Microsoft Excel MVP


"gooders" wrote in message
...
Thanks for your response but the formula isn't working for me. In the
Text
formula it returns a value of 0 which is incorrect as there are
definitely
Mar2010 dates.

In the other solution I get a #value error.

Thanks guys

"T. Valko" wrote:

One way...

=SUMPRODUCT(--(TEXT('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001,"mmmyyyy")="Mar2010"))

--
Biff
Microsoft Excel MVP


"gooders" wrote in message
...
Hi, I have a column that is predominately filled with dates i.e.
1/12/2010;
16/4/2010 etc, and my formula below counted the number of rows based
upon
the
month and year of these dates, this worked well until now. Some
fields
within
the column now have text instead of a date and this has now messed
up
my
formula which returns a #value error. Any assistance you can give
would
be
greately appreciated.

Thanking you in advance.

=SUMPRODUCT(N(MONTH('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001)=3),N(YEAR('C:\Users\[monitor.xls]Adjusting
Output'!$A$3:$A$10001)=2010))



.



.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:11 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.