countif

jswaim

Board Regular
Joined
Sep 27, 2002
Messages
141
Hi, I am working with some data, and need to find certain models, that have a certain option code, and are below an MSRP of $35,000. The model code is in column A, Option codes are in column B, and MSRP, is in Column E. Below is an example. The option I need code is the last one in column B (1SJ). I have hundred of similar units at different prices. So, Here is what I need to determine, How may CC15936's do I have with the 1SJ option, that are below an MSRP of $34,000 dollars. Thanks in advance for your help.

Also, I would like you all to know, that I have many different models as well, so a simple countif will not work.

(Column A) CC15936
(Column B)AE7,AG1,B30,CJ3,C49,DL8,EN4,FE9,GT4,K34,LM7,M30,PDE,PF9,QMJ,R9U,SAF,T96,UB0,VB3,V54,V76,WBH,ZW9,ZY1,Z82,1SJ
(Column C) 34,000[/list]
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
jswaim said:
Hey, Aladin,
Just the man I need, I am still having trouble with this formula, do you have any advice?

The MATCH bit in

=SUMPRODUCT(($A$2:$A$3041=V9)*(ISNUMBER(MATCH("*"&W9&"*",$B$2:$B$3041,0)))*($G$2:$G$3041>=X9)*($G$2:$G$3041<=Y9))

is a mistake. While

MATCH(Range,Cond,0)

is correct,

MATCH(Cond,Range,0)

is not, given the nature of the query. The Match bit in such cases must be replaced with SEARCH(Cond,Range). Thus:

=SUMPRODUCT(($A$2:$A$3041=V9)*(ISNUMBER(SEARCH(W9,$B$2:$B$3041)))*($G$2:$G$3041>=X9)*($G$2:$G$3041<=Y9))

Jon: The lenght of the strings in B does not seem to constitute a problem here.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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