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 :oops:
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
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 :biggrin: , 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

(y)
 
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,

:p
 
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
(y)
:biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin:
 
Upvote 0

Forum statistics

Threads
1,215,972
Messages
6,128,027
Members
449,414
Latest member
sameri

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