Excel Sort, Filter, Charts and PivotTables
Once your data is in Excel, these tools help you organise it and find answers quickly.
The Example Data
Monthly sales from a mobile accessories shop:
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Date | Branch | Product | Amount |
| 2 | 02/10/2026 | Saddar | Charger | 1200 |
| 3 | 03/10/2026 | Orangi | Earbuds | 3500 |
| 4 | 05/10/2026 | Saddar | Cover | 600 |
| 5 | 07/10/2026 | Orangi | Charger | 1500 |
| 6 | 09/10/2026 | Gulshan | Earbuds | 4200 |
| 7 | 11/10/2026 | Orangi | Cover | 900 |
First turn your data into a table: click inside it and press Ctrl + T. Tables grow automatically when you add rows, and they come with filter buttons.
Sorting
Click a cell in the column, then Data > Sort A to Z (smallest first) or Sort Z to A (largest first). For more levels, use Data > Sort, for example Branch A to Z, then Amount largest to smallest.
In Microsoft 365 and Excel 2021, the SORT function returns a sorted copy and keeps the original unchanged:
Example
=SORT(A2:D7, 4, -1)The 4 means sort by the fourth column (Amount) and -1 means largest first:
| Date | Branch | Product | Amount |
|---|---|---|---|
| 09/10/2026 | Gulshan | Earbuds | 4200 |
| 03/10/2026 | Orangi | Earbuds | 3500 |
| 07/10/2026 | Orangi | Charger | 1500 |
| 02/10/2026 | Saddar | Charger | 1200 |
| 11/10/2026 | Orangi | Cover | 900 |
| 05/10/2026 | Saddar | Cover | 600 |
Filtering
Click Data > Filter (or use the table's buttons). Click the arrow in a header and tick only the values you want, such as Branch = Orangi. Rows that do not match are hidden, not deleted.
The FILTER function returns matching rows as a new list:
Example
=FILTER(A2:D7, B2:B7="Orangi")| Date | Branch | Product | Amount |
|---|---|---|---|
| 03/10/2026 | Orangi | Earbuds | 3500 |
| 07/10/2026 | Orangi | Charger | 1500 |
| 11/10/2026 | Orangi | Cover | 900 |
Filter with two conditions by multiplying them (both must be true):
Example
=FILTER(A2:D7, (B2:B7="Orangi")*(D2:D7>1000), "No match")| Date | Branch | Product | Amount |
|---|---|---|---|
| 03/10/2026 | Orangi | Earbuds | 3500 |
| 07/10/2026 | Orangi | Charger | 1500 |
Conditional Formatting
Conditional formatting colours cells automatically based on their values. Select D2:D7, then Home > Conditional Formatting:
- Highlight Cells Rules > Greater Than 3000 in green
- Data Bars to show small bars inside the cells
- Color Scales to colour low to high values
You can also use a formula rule. To highlight whole rows for the Orangi branch, select A2:D7, choose New Rule > Use a formula, and enter:
Example
=$B2="Orangi"Charts
A chart turns numbers into a picture. Select the data (including headers), then Insert and pick a chart:
| Chart | Best for |
|---|---|
| Column / Bar | Comparing values, e.g. sales per branch |
| Line | Changes over time, e.g. sales per month |
| Pie | Parts of a whole, with only a few slices |
| Scatter | The relationship between two numbers |
Use Chart Elements (the + button) to add a title, data labels and axis titles. Keep charts simple: one message per chart.
PivotTables
A PivotTable summarises a big table in a few clicks, without any formulas.
- Click inside the data and choose Insert > PivotTable
- Choose New Worksheet and click OK
- Drag Branch to Rows
- Drag Amount to Values (it becomes Sum of Amount)
- Optionally drag Product to Columns
The result:
| Branch | Charger | Cover | Earbuds | Grand Total |
|---|---|---|---|---|
| Gulshan | 4200 | 4200 | ||
| Orangi | 1500 | 900 | 3500 | 5900 |
| Saddar | 1200 | 600 | 1800 | |
| Grand Total | 2700 | 1500 | 7700 | 11900 |
When new data is added, right-click the PivotTable and choose Refresh. You can also check a PivotTable number with a formula:
Example
=SUMIFS(D2:D7, B2:B7, "Orangi")| Result |
|---|
| 5900 |
Exercise
Exercise
You have 5,000 rows of sales and want total sales per branch without writing formulas. Which tool is best?
