Countif and Data Sorting

Joneye

Well-known Member
Joined
May 28, 2010
Messages
785
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
Table 2 is the formula used in the outputs to table 2 (for explanation purpose). What im having an issue is going to Data Tab >> Sort >> Sort by Count >> Sort on Cell Values >> Order Largest to Smallest.

What is returned is not the order of higest number by country it fires out some random list (i think i may have an incorrect process or formula), any advice is apprecaited.

Table 1
Country​
Count​
Algeria​
5
Andorra​
1
Argentina​
35
Australia​
167

Table 2
Country​
Count​
Algeria​
=COUNTIF(Sheet1!$B$2:$B$10000,Dashboard!G2)​
Andorra​
=COUNTIF(Sheet1!$B$2:$B$10000,Dashboard!G3)​
Argentina​
=COUNTIF(Sheet1!$B$2:$B$10000,Dashboard!G4)​
Australia​
=COUNTIF(Sheet1!$B$2:$B$10000,Dashboard!G5)​
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Remove this part from formula
Dashboard!

=COUNTIF(Sheet1!$B$2:$B$10000,Dashboard!G2)

and use

Excel Formula:
=COUNTIF(Sheet1!$B$2:$B$10000,G2)
 
Upvote 1
Solution
Remove this part from formula
Dashboard!

=COUNTIF(Sheet1!$B$2:$B$10000,Dashboard!G2)

and use

Excel Formula:
=COUNTIF(Sheet1!$B$2:$B$10000,G2)
Thank you, worked perfectly.
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

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