Welcome to the Excel Forum

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.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 05-29-2008, 12:27 PM
alecabral08 alecabral08 is offline
Registered User
 
Join Date: 29 May 2008
Posts: 14
alecabral08 is becoming part of the community
Count multiple rows (text) with multiple criteria (text)

Please Register to Remove these Ads

Hi there!

Hereīs the thing: I have a table/worksheet (DataTable) where I track every business opp that our salesmen insert in our crm. One of the columns of this table, named "source code" holds the name of the event that generated the business lead. I.e: "breakfast at hilton hotel". There are multiple rows that in this column hold this value, as well as others hold others. (I will attach an example, sorry if Iīm not clear enough).

Hereīs the thing: in another worksheet (SourceCodes)I have another table holding the entire list of available source codes, by event type. This means that each source code is related to one specific event type. I.e: social events, launchs, etc.

Now, there is yet another worksheet (Stats) where my table is empty and here is my problem. I need to count rows in my first worksheet/table and determine, matching them to the data in the second sheet (validating data) grouping them by event type.

So, basically in this last table I need to see for example how many social events we hosted, (i donīt need the detail on how many breakfasts, cocktails and such we did, but the sum of all of them).

What formula should I try? SUM, SUMIF, DCOUNTA and such havenīt been of much help up to now...

Thanks!!!

Ale
Attached Files
File Type: xls example.xls (15.5 KB, 17 views)
Reply With Quote
  #2  
Old 05-29-2008, 12:37 PM
NBVC's Avatar
NBVC NBVC is online now
Forum Guru
 
Join Date: 06 Dec 2006
Location: Mississauga, CANADA
MS Office Version:2003 & 2007
Posts: 18,335
NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future
In E5:
Code:
=SUMPRODUCT(--ISNUMBER(MATCH(DataTable!$E$3:$E$9,SourceCodes!$D$5:$D$10,0)),DataTable!$F$3:$F$9)
in E6:

Code:
=SUMPRODUCT(--ISNUMBER(MATCH(DataTable!$E$3:$E$9,SourceCodes!D11:D14,0)),DataTable!$F$3:$F$9)
in E7:

Code:
=SUMPRODUCT(--ISNUMBER(MATCH(DataTable!$E$3:$E$9,SourceCodes!$D$15:$D$18,0)),DataTable!$F$3:$F$9)
__________________
Where there is a will there are many ways. Pick One!

Please read the Forum Rules

If you are happy with the results, please add to my reputation by clicking the icon next to the Post # in the bar of my avatar (picture) in this post.

Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Reply With Quote
  #3  
Old 05-29-2008, 03:00 PM
alecabral08 alecabral08 is offline
Registered User
 
Join Date: 29 May 2008
Posts: 14
alecabral08 is becoming part of the community
hi! Thanks, though this formula adds the values at the U$S column. Thatīs fine, but what I need to know is how many of my opportunities where created from each event, so what I need is to count the events codes, not add the values.

Any ideas?

Thanks!
Reply With Quote
  #4  
Old 05-29-2008, 03:13 PM
NBVC's Avatar
NBVC NBVC is online now
Forum Guru
 
Join Date: 06 Dec 2006
Location: Mississauga, CANADA
MS Office Version:2003 & 2007
Posts: 18,335
NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future
Just delete the last argument from each Sumproduct() formula.

i.e. delete: ,DataTable!$F$3:$F$9
__________________
Where there is a will there are many ways. Pick One!

Please read the Forum Rules

If you are happy with the results, please add to my reputation by clicking the icon next to the Post # in the bar of my avatar (picture) in this post.

Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Reply With Quote
  #5  
Old 05-29-2008, 05:19 PM
alecabral08 alecabral08 is offline
Registered User
 
Join Date: 29 May 2008
Posts: 14
alecabral08 is becoming part of the community
Thanks a lot, that worked!!!
Reply With Quote
  #6  
Old 07-21-2008, 04:47 PM
alecabral08 alecabral08 is offline
Registered User
 
Join Date: 29 May 2008
Posts: 14
alecabral08 is becoming part of the community
Hi again

As this formula yo helped me with worked wonders in my dashboard, I decided to try and expand itīs use though it seems I am not good enough yet.

In the same example I attached before, I added a "created" column (DataTable sheet) which indicates in which Fiscal Year this opportunity was created in our system.

In the stats sheet I added 4 more columns: FY08 (U$S and quantity) and FY09 (U$S and quantity). I should be able to split the original values into these categories.

i.e.:
E5 should be the sum of G5 and I5.
F5 should be the sum of H5 and J5.

I know how to sum of course, but the question is what would be the formulas for G, I, H and J? I canīt use the original formulas that now count and sum in E and F, as those have no information on the created fiscal year.

Thanks

Ps: Iīm attaching the modified example
Attached Files
File Type: xls example.xls (25.0 KB, 4 views)
Reply With Quote
  #7  
Old 07-21-2008, 04:59 PM
NBVC's Avatar
NBVC NBVC is online now
Forum Guru
 
Join Date: 06 Dec 2006
Location: Mississauga, CANADA
MS Office Version:2003 & 2007
Posts: 18,335
NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future NBVC has a brilliant future
Just a matter of adding an extra condition to each Sumproduct() formula...

see attached.
Attached Files
File Type: xls example-4.xls (26.0 KB, 17 views)
__________________
Where there is a will there are many ways. Pick One!

Please read the Forum Rules

If you are happy with the results, please add to my reputation by clicking the icon next to the Post # in the bar of my avatar (picture) in this post.

Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Reply With Quote
  #8  
Old 07-21-2008, 05:26 PM
alecabral08 alecabral08 is offline
Registered User
 
Join Date: 29 May 2008
Posts: 14
alecabral08 is becoming part of the community
Thanks! I was missing one part, that explains why it wasnīt working.
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump