Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / General Excel Questions / May 2008

Tip: Looking for answers? Try searching our database.

SUMIF/SUMPRODUCT Criteria are Variable Sized

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Thomas [PBD] - 16 May 2008 16:46 GMT
Hello all,

Currently I am attempting to pull a number from another tab in my workbook
that is a compilation of sub-grouped items.  The coding that I was attempting
was:

=SUMIF(Smithfield!A:A,Combined!A14:A23,Smithfield!I:I)

Which will not work due to the multiple criteria.  I have also attempted a
SUMPRODUCT code, but because the two arrays are not the same size, a #VALUE
or #NUM value is returned.  Let's example here (n is a place holder for any
number):

Smithfield tab:
Col A     Col I
5           0
1           20
2           15
2           20
12           0
12           17
3         36
16          52
n           etc...

Combined tab:
Col A
12
5
3
7
n

In short, one tab holds all data with multiple groups, another combines like
groups together for a single number.  The data on the Combined tab and on the
Smithfield tab can be in any order.  As the two arrays A:A and A14:A23 are
not the same size, neither the SUMPRODUCT nor the SUMIF will allow it.  I am
looking to pull ONE number as a summation of a group listing (as it is not
the entire list, but a section of it), so if there are 65 groups and I want
to see groups that are listed in the section described (which does not have
to be in a specific order--could be 17,2,5,3,4,22,60,33,etc. in the group I
want to look at), I want to pull one number for the sum of those specified
groups.

Any ideas on how to accomplish this feat?
T. Valko - 16 May 2008 17:13 GMT
Try this:

=SUMPRODUCT(--(ISNUMBER(MATCH(Smithfield!A1:A100,Combined!A14:A23,0))),Smithfield!I1:I100)

Note that with SUMPRODUCT you *can't* use entire columns as range references
unless you're using Excel 2007.

Signature

Biff
Microsoft Excel MVP

> Hello all,
>
[quoted text clipped - 50 lines]
>
> Any ideas on how to accomplish this feat?
Thomas [PBD] - 19 May 2008 13:00 GMT
Works great.  MATCH(), haven't seen it before.  Will definitely be using that
more often.

> Try this:
>
[quoted text clipped - 57 lines]
> >
> > Any ideas on how to accomplish this feat?
T. Valko - 19 May 2008 17:19 GMT
You're welcome. Thanks for the feedback!

Signature

Biff
Microsoft Excel MVP

> Works great.  MATCH(), haven't seen it before.  Will definitely be using
> that
[quoted text clipped - 70 lines]
>> >
>> > Any ideas on how to accomplish this feat?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.