Forestq

Active Member
Joined
May 9, 2010
Messages
482
Hi,

I have function to count how many many times name from column C (sheet M1) appear in range (sheet CSTG, column B):
Code:
=COUNTIFS(CSTG!$B:$B,'M1'!C7)
Column CColumn D - only count
Audi5
BMW7
VW10
Fiat3

<tbody>
</tbody>

Now in column Q (sheet CSTG) I have different values, like: 1, 1.0, 1.2, 2.0, 3.2 etc.

I need to count how many different values is for each name for column C.

Column CColumn DColumn E - diffrent version
Audi32
BWM75
VW104
Fiat32

<tbody>
</tbody>

What should I do?
 
cool,
can I replace 3 IF, one COUNTIF function?
I'm asking, because I have 5 or 7 condition.

regards
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
cool,
can I replace 3 IF, one COUNTIF function?
I'm asking, because I have 5 or 7 condition.

regards

No, we don't want COUNTIF(S)...

If most conditions are associated with an equality test, we can resort to concatenation in order to avoid the inevitable performance problems for each condition would augment the costs.

What follows illustrates what concatenation involves.

1. Activate CSTG.

2. In Z2 enter and copy down (the concatenation range)...
Rich (BB code):

=$B2&"|"&$G2&"|"&IF($Q2="","",$Q2)

3. Define Ivec in Formulas | Name Manager as referring to:
Rich (BB code):

=ROW(CSTG!$Z$2:$Z$100)-ROW(CSTG!$Z$2)+1

4. Now invoke... Control+shift+enter, not just enter:
Rich (BB code):

=SUM(IF(FREQUENCY(IF(ISNUMBER(SEARCH($C2&"*"&"Completed",CSTG!$G$2:$G$100)),
    MATCH(CSTG!$Z$2:$Z$100,CSTG!$Z$2:$Z$100,0)),Ivec),1))

5. Verify that [4] behaves as intended.

6. Add other condition ranges to the concatenation range, which involve an equality test.
 
Upvote 0
I see your point, thx! I know now how to change, modify list of uniq values.
Perfect!

thanks Aladin!
 
Upvote 0

Forum statistics

Threads
1,215,660
Messages
6,126,088
Members
449,287
Latest member
lulu840

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