multiple criteria with wildcard

Dookie

New Member
Joined
Apr 7, 2011
Messages
18
Please help...
I have this board

a b c
CARS 0800/0900 10
CARS -/1000 20
CARS -/1300 12
TRACKS 1500/- 15
TRACKS 1700/- 20
TRACKS 1700/1800 21
BIKES - 8
BIKES -/1800 9
BIKES 10

I want to count the for eg the cars (column a) which departed from my station (-/???), or to count the tracks which arrived and departed from my station (????/????).
I'm using these formulas:
SUM((A1:A9="CARS")*(ISNUMBER(SEARCH("-/";B1:B9;1)*C1:9)))
or
SUMPRODUCT((A1:A9="CARS")*(ISNUMBER(SEARCH("-/";B1:B9;1)*C1:9)))
and both of them gives me back 2 (the number of cells), not the count of the cars that match with my criteria (20+12=22)

Thank u in advance for your support!!:)
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Just looking at your SUMPRODUCT, if you want to sum the numbers in column C, you should be using a comma:

SUMPRODUCT((A1:A9="something")*(B1:B9="otherstuff"),(C1:C9))

This is like saying,
if A="something" AND B="otherstuff", THEN sum C

Hope that makes some sense.
 
Upvote 0
i'm using the (ISNUMBER(SEARCH("-/";B1:B9;1) formula, cause i'm not able to use wildcards in sum or sumproduct with multiple criteria....

I replaced the * with , as u suggested -with and without the () ,(C1:C9) and ,C1:C9- but it gives me back that i'm doing something wrong....

Any more suggestions???
 
Upvote 0
Dookie,

This works for me:

Code:
=SUMPRODUCT((A1:A9="CARS")*(ISNUMBER(SEARCH("-/",B1:B9,1))),(C1:C9))

You would have to change
Code:
,
to
Code:
 ;
in yours as it looks like you're using a none English language pack. Sorry I didn't notice that before.
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,254
Members
452,900
Latest member
LisaGo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top