Help with Filter and Sort

CTMom

New Member
Joined
Jul 4, 2004
Messages
39
Office Version
  1. 365
Platform
  1. Windows
Hi I have a table with countif formula - a list of names and sales numbers - which is pretty simple but the sort or filter function is not working. (I cannot post the actual sheet here as the xl2bb add in is not working either!).

Column A - names in text format
Column B -
=COUNTIF(Grossdata!$T$7:$T$3249,Summary!a8)
where Grossdata is on another worksheet and A1 = name.

Just trying to count number of sales by name and then sort by largest to smallest. Neither Sort or Filter is working. there are no blank cells and no error messges or NA, etc. So am completely at a loss as to why it is not working

Any help greatly appreciated.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
I am not sure I have the requirements right but see if this is what you had in mind.
PS: assuming the formula resides on the Sheet Summary, I would normally drop the sheet name in the reference and just use "A8", it means the formula has less clutter in it.

20221009 Filter Sort Count CTMom.xlsx
ABCD
7CriteriaCountFilter NameFilter Amt
8Tom3Tom3000
9Tom300
10Tom30
Summary
Cell Formulas
RangeFormula
B8B8=COUNTIF(Grossdata!$T$7:$T$3249,Summary!A8)
C8:D10C8=SORT(FILTER(Grossdata!$T$7:$U$3249,Grossdata!$T$7:$T$3249=Summary!A8),2,-1)
Dynamic array formulas.


My test data in case anyone else wants to buy in.

20221009 Filter Sort Count CTMom.xlsx
TU
6NamesSales
7John20
8Tom30
9Joan40
10Wendy50
11Bob60
12John200
13Tom300
14Joan400
15Wendy500
16Bob600
17John2000
18Tom3000
19Joan4000
20Wendy5000
21Bob6000
Grossdata
 
Upvote 0
If you are trying to sort the data using the Sort button on the Data tab, then the problem is the part in red
Rich (BB code):
=COUNTIF(Grossdata!$T$7:$T$3249,Summary!a8)
You should never refer to the name of the sheet the formula is on. Just use
Excel Formula:
=COUNTIF(Grossdata!$T$7:$T$3249,a8)
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,794
Members
449,048
Latest member
greyangel23

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