Welcome Back

Google icon Sign in with Google
OR
I agree to abide by Pharmadaily Terms of Service and its Privacy Policy

Create Account

Google icon Sign up with Google
OR
By signing up, you agree to our Terms of Service and Privacy Policy
Instagram
youtube
Facebook

Sorting and Filtering Data in Google Sheets

Objective:

Understand how to sort and filter datasets using basic and advanced filter options, including sort by condition.


Step 1: Sample Dataset

Create this sample table in your Google Sheet:

Name Age City Score
Anjali 22 Bhopal 87
Rohit 21 Indore 65
Sneha 24 Bhopal 78
Aman 23 Ujjain 90
Pratik 20 Indore 55

Step 2: Basic Sorting

Sort by Score (Descending)

  1. Select the full data table including headers

  2. Click on Data > Sort range

  3. Check Data has header row

  4. Sort by Score → Z → A

This will sort students from highest to lowest scores.

Sort by Name (Alphabetical)

  • Use A → Z to sort names alphabetically


Step 3: Apply Basic Filter

Add Filter:

  1. Select your table including headers

  2. Click Data > Create a filter

  3. Small filter icons appear in header cells

Filter Example:

  • Click filter icon on City column → Uncheck all → Select only Bhopal

  • You will now only see rows from Bhopal

Clear filters anytime using Data > Remove filter


Step 4: Sort by Condition

Example: Show students scoring above 70

  1. Click filter icon on Score column

  2. Choose Filter by condition

  3. From dropdown, select Greater than → type 70

  4. Click OK

You will now see only students with scores above 70.

Other condition options include:

  • Text contains

  • Date is before/after

  • Empty / Non-empty


Step 5: Advanced Filter – Filter Views

Filter views allow different users to view different filters without affecting others.

Create a Filter View:

  1. Click Data > Filter views > Create new filter view

  2. Apply a filter (e.g., show only Age > 21)

  3. Rename the view (e.g., “Age Filtered View”)

  4. Use the view when needed, others won’t be affected


Mini Practice Challenge – Employee Data

Employee Dept Salary Location
Aayushi HR 35000 Delhi
Manav Marketing 28000 Bhopal
Raj HR 30000 Delhi
Riya Sales 40000 Mumbai

Tasks:

  • Sort employees by Salary (High to Low)

  • Filter to show only Delhi employees

  • Apply condition to show Salary > 30000

  • Create a filter view for only HR department