Aggregate function use with text

RicardoCubed

Board Regular
Joined
Jul 10, 2013
Messages
206
Office Version
  1. 365
Platform
  1. Windows
Hi all. I am trying various combinations of the Aggregate function to count the number of time the letter x appears in column that adjusts when you filter the list.
I want it to be dynamic as when i filter the list by other criteria I only want to count the filter list where x appears.
So, in the case below if I filter the list for Dept A the the result should be 1.
I would think i can replace in cell C1 the countif with an aggregate that would ignore hidden rows once filtered.
Are you able to use Aggregate function on text?
Thanks in advance for any help on this.

ABC
1TotalDept5
2Name1Ax
3Name2B
4Name3Cx
5Name4Dx
6Name5A
7Name6B
8Name7Cx
9Name8D
10Name9Dx
11Name10A
12Name11B

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
C1=COUNTIF(C2:C12,"x")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Try...

=SUMPRODUCT(SUBTOTAL(3,OFFSET(C2,ROW(C2:C12)-ROW(C2),0,1)),--(C2:C12="x"))
 
Last edited:
Upvote 0
Aladin. thanks so much ! and works in the sample case i posted !
So now i am actually trying to use this approach in related scenario to cycle through a column populated with index match formulas that return an "x" if it finds the x in a column in another sheet.
Is there a way to get the same result and ignore where the index/match is not returning an x?
Hope my question makes sense and do again all your help - with this and over the years!
 
Upvote 0
This is from the workbook that illustrates what I am trying to accomplish.
I am trying to "replace" the AU3 formula so that when I filter the data and it hides all of the index match rows that dont meet the filter criteria the AU3 formula will only count the number of occurrences that have an "x" result. The index match formula that resides in the AU column range looks to another sheet in the file as shown.

Aggregate works great with numbers but will it work the same with text?

Apologies if not clear. Maybe I have to start a brand new post and create a small sample worksheet?

AU
320
4perform
5
6
7
8
9
10
11
12
13
14x
15x
16
17
18
19
20x
21
22
23x

<tbody>
</tbody>
CompCommittee

Worksheet Formulas
CellFormula
AU3=COUNTIF(AU$6:AU$486,"x")
AU6=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B6,Detail!$DR$4:$DR$502,0))&""
AU7=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B7,Detail!$DR$4:$DR$502,0))&""
AU8=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B8,Detail!$DR$4:$DR$502,0))&""
AU9=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B9,Detail!$DR$4:$DR$502,0))&""
AU10=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B10,Detail!$DR$4:$DR$502,0))&""
AU11=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B11,Detail!$DR$4:$DR$502,0))&""
AU12=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B12,Detail!$DR$4:$DR$502,0))&""
AU13=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B13,Detail!$DR$4:$DR$502,0))&""
AU14=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B14,Detail!$DR$4:$DR$502,0))&""
AU15=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B15,Detail!$DR$4:$DR$502,0))&""
AU16=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B16,Detail!$DR$4:$DR$502,0))&""
AU17=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B17,Detail!$DR$4:$DR$502,0))&""
AU18=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B18,Detail!$DR$4:$DR$502,0))&""
AU19=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B19,Detail!$DR$4:$DR$502,0))&""
AU20=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B20,Detail!$DR$4:$DR$502,0))&""
AU21=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B21,Detail!$DR$4:$DR$502,0))&""
AU22=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B22,Detail!$DR$4:$DR$502,0))&""
AU23=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B23,Detail!$DR$4:$DR$502,0))&""

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
I don't get it.

In which row do you have the headers?

On which header are you applying a filter?

You seem to have this formula

=INDEX(Detail!EN$4:EN$502,MATCH(CompCommittee!$B6,Detail!$DR$4:$DR$502,0))&""

in the AU-range. What this formula return if not an x?
 
Upvote 0
Sorry for not making this easier to follow.
I will create a separate illustration/example and submit new thread.
Will title it: "Aggregate Function with Text - Take 2".
Not be able to submit till perhaps tomorrow.
Again thank you for you time and interest. I have learned so much from you and this forum.
Regards - till next posting.
 
Upvote 0

Forum statistics

Threads
1,215,011
Messages
6,122,677
Members
449,092
Latest member
tayo4dgacorbanget

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