Wildcards in Array Function - NEWBIE

seals

New Member
Joined
Apr 13, 2004
Messages
4
Can anyone help a newbie?

I am trying to count the number of records that match two criteria as follows:

=SUM(IF(ORB!F10:F900="Super critical",IF(ORB!O10:O900="DLARA",1,0)))

This works fine, however I would like to use a wildcard for "DLARA" as such "*ARA", but sadly it doesn't like that much. Does anyone have any sugestions?

Thank you in advance.

Mark :banghead:
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Welcome!

Try:

=SUMPRODUCT((ORB!F10:F900="Super critical")*(ISNUMBER(FIND("LARA",ORB!O10:O900))))

This one does not need to be array entered.
 
Upvote 0
Thanks for the reply,

That suggestion works but I am trying to use a wild card instead of the actual "DLARA" so I would like to pick up all the ARA's somehow.

And if I could impose :-D , what is the best way to use the function
=SUM(IF(ORB!F10:F900="Super critical",IF(ORB!O10:O900="DLARA",1,0)))

but have a third criteria. Thanks again.

Mark

:beerchug:
 
Upvote 0
Scratch part of the last post I have fiddled and worked it out like such:
=SUM(IF(ORB!F10:F900="Super critical",IF(ORB!O10:O900="DLARA",1,0), IF(ORB!K10:K900="4",1,0)))

However I would still like to know how to use a wildcard in the second part of the function "DLARA" something like "*ARA"



Cheers,

:hungry:
 
Upvote 0
To answer your first question:

=SUMPRODUCT((ORB!F10:F900="Super critical")*(ISNUMBER(FIND("ARA",ORB!O10:O900))))

I use the "ISNUMBER FIND" combination as you cannot use a wildcard in this function.

Added one condition should be:

=SUMPRODUCT((ORB!F10:F900="Super critical")*(ORB!K10:K900=4)*(ISNUMBER(FIND("ARA",ORB!O10:O900))))
 
Upvote 0
Another way:

As noted by Fairwinds, SUMPRODUCT does not accept wildcards. However, you can use explicit matching to obtain your results.

Using columns A and B as an example:
Wildcards - SUMIF and SUMPRODUCTS.xls
ABCDEFG
1ADLARA133
2B2
3SuperCriticalABARA3
4D4
5SuperCriticalARS5
6SuperCriticalCSARA6
7G7
8H8
9I9
10SuperCriticalXYARA10
11
Sheet2


E1:
=SUMPRODUCT((A1:A10="Super Critical")*(RIGHT(B1:B10,3)="ARA"))

F1 (Fairwind’s method):
=SUMPRODUCT((A1:A10="Super critical")*(ISNUMBER(FIND("ARA",B1:B10))))


HTH

Mike
 
Upvote 0
To both Fair Winds and Mike,

Thank you very much for your help.

If there is anything I can do in return please let me know.


Cheers,

Mark
:beerchug:
:-D :-D :-D :-D :-D :-D :-D :-D :-D :-D :-D :-D :-D :-D
 
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,114
Members
452,302
Latest member
TaMere

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