#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default sumproduct by year??

I have a multi-columned worksheet, and am trying to pick out certain data.

One column has file names & the other has dates this file was submitted.
The formulas I'm using a
=SUMPRODUCT(--($C$2:$C$15403<"ABCD*"),(--(YEAR($I$2:$I$15403)=2007))) where
"ABCD*" is the prefix for the file name. This seems to be ok, except I'm
gett ALL of the files that were filed in 2007, not just the ones with the
ABCD prefix.

Any help is appreciated...
Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default sumproduct by year??

I think you need LEFT and don't you want = not <

=SUMPRODUCT(--(left($C$2:$C$15403,4)="ABCD"),(--(YEAR($I$2:$I$15403)=2007)))

"MDI Anne" wrote:

I have a multi-columned worksheet, and am trying to pick out certain data.

One column has file names & the other has dates this file was submitted.
The formulas I'm using a
=SUMPRODUCT(--($C$2:$C$15403<"ABCD*"),(--(YEAR($I$2:$I$15403)=2007))) where
"ABCD*" is the prefix for the file name. This seems to be ok, except I'm
gett ALL of the files that were filed in 2007, not just the ones with the
ABCD prefix.

Any help is appreciated...
Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default sumproduct by year??

Perfect!! Thank you!!

"Joel" wrote:

I think you need LEFT and don't you want = not <

=SUMPRODUCT(--(left($C$2:$C$15403,4)="ABCD"),(--(YEAR($I$2:$I$15403)=2007)))

"MDI Anne" wrote:

I have a multi-columned worksheet, and am trying to pick out certain data.

One column has file names & the other has dates this file was submitted.
The formulas I'm using a
=SUMPRODUCT(--($C$2:$C$15403<"ABCD*"),(--(YEAR($I$2:$I$15403)=2007))) where
"ABCD*" is the prefix for the file name. This seems to be ok, except I'm
gett ALL of the files that were filed in 2007, not just the ones with the
ABCD prefix.

Any help is appreciated...
Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default sumproduct by year??

You can't directly use wildcards in SUMPRODUCT.

This seems to be ok, except I'm gett ALL of the files
that were filed in 2007, not just the ones with the
ABCD prefix.


Your formula is counting all instances that *do not* start with the ABCD
prefix.

Try this:

=SUMPRODUCT(--(LEFT($C$2:$C$15403,4)<"ABCD"),--(YEAR($I$2:$I$15403)=2007))

--
Biff
Microsoft Excel MVP


"MDI Anne" wrote in message
...
I have a multi-columned worksheet, and am trying to pick out certain data.

One column has file names & the other has dates this file was submitted.
The formulas I'm using a
=SUMPRODUCT(--($C$2:$C$15403<"ABCD*"),(--(YEAR($I$2:$I$15403)=2007)))
where
"ABCD*" is the prefix for the file name. This seems to be ok, except I'm
gett ALL of the files that were filed in 2007, not just the ones with the
ABCD prefix.

Any help is appreciated...
Thanks!



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default sumproduct by year??

Ok...now I want to do the same thing except the prefix changes to "WXYK"

Why can't I copy the formula & substitute?? it gives me the #VALUE! error...

"Joel" wrote:

I think you need LEFT and don't you want = not <

=SUMPRODUCT(--(left($C$2:$C$15403,4)="ABCD"),(--(YEAR($I$2:$I$15403)=2007)))

"MDI Anne" wrote:

I have a multi-columned worksheet, and am trying to pick out certain data.

One column has file names & the other has dates this file was submitted.
The formulas I'm using a
=SUMPRODUCT(--($C$2:$C$15403<"ABCD*"),(--(YEAR($I$2:$I$15403)=2007))) where
"ABCD*" is the prefix for the file name. This seems to be ok, except I'm
gett ALL of the files that were filed in 2007, not just the ones with the
ABCD prefix.

Any help is appreciated...
Thanks!



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default sumproduct by year??

The only thing in your equation that would give a #Value error is if
I2:I15403 isn't a date. You would of seen this with the original formula for
ABCD. There must be some bad data in the I column giving you the problem. I
can't answer why you didn't see the problem with your original formula.

"MDI Anne" wrote:

Ok...now I want to do the same thing except the prefix changes to "WXYK"

Why can't I copy the formula & substitute?? it gives me the #VALUE! error...

"Joel" wrote:

I think you need LEFT and don't you want = not <

=SUMPRODUCT(--(left($C$2:$C$15403,4)="ABCD"),(--(YEAR($I$2:$I$15403)=2007)))

"MDI Anne" wrote:

I have a multi-columned worksheet, and am trying to pick out certain data.

One column has file names & the other has dates this file was submitted.
The formulas I'm using a
=SUMPRODUCT(--($C$2:$C$15403<"ABCD*"),(--(YEAR($I$2:$I$15403)=2007))) where
"ABCD*" is the prefix for the file name. This seems to be ok, except I'm
gett ALL of the files that were filed in 2007, not just the ones with the
ABCD prefix.

Any help is appreciated...
Thanks!

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 criteria, month, & year Eric M. Excel Worksheet Functions 4 February 25th 08 08:26 PM
Using COUNTIF or SUMPRODUCT for Year PSmith Excel Discussion (Misc queries) 3 November 30th 07 03:59 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
sumproduct in a given year Bumblebee Excel Worksheet Functions 8 August 19th 06 06:59 PM


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

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"