Skip to the content

Topics Covered

Charts & Graphs Histogram COUNT family FREQUENCY array PivotTable PivotChart
On this page
  1. 1. Creating Charts in Excel
  2. 2. Frequency Tables with COUNT Functions
  3. 3. FREQUENCY Function (for Grouped Data)
  4. 4. PivotTables — Powerful Summarisation
  5. 5. PivotCharts
  6. Best Practices for Visualization
  7. Key Take-aways

1. Creating Charts in Excel

Select the data range → Insert tab → choose chart type → click. Customise with Chart Design and Format tabs.

Common Chart Types and When to Use Each

ChartBest for
ColumnComparing values across categories (vertical bars)
BarSame as column but horizontal — useful for long category names
LineTrends over time (continuous data)
AreaCumulative trend (filled area beneath line)
Pie / DoughnutParts of a whole, ≤ 6 categories
Scatter (XY)Relationship between two numeric variables
BubbleThree-variable relationship (X, Y, size)
HistogramDistribution of one continuous variable
Box & WhiskerFive-number summary, outliers
ComboMix of bar + line, e.g., sales + growth rate

Chart Elements and Formatting

Pie Chart Example

For category totals (Food, Rent, Education, Savings):

  1. Enter categories in A2:A5 and values in B2:B5.
  2. Select A2:B5 → Insert → Pie chart.
  3. Right-click slice → Add Data Labels → choose Percentage.
  4. Apply a meaningful title.

Histogram (built-in chart, Excel 2016+)

  1. Select the data column.
  2. Insert → Statistic Chart → Histogram.
  3. Right-click the X-axis → Format Axis → choose Bin width or Number of bins.

Alternative: Data → Data Analysis → Histogram (ToolPak). Provide Input Range and Bin Range; tick "Chart Output".

EXAMPLE 1 (Column chart)

Sales in 5 years 200, 250, 300, 280, 350 (B2:B6 with years in A2:A6). Select A2:B6 → Insert → Column. Result: 5 vertical bars showing growth.

EXAMPLE 2 (Scatter with trend line)

Hours of study (A2:A10) vs marks (B2:B10). Select → Insert → Scatter → "Scatter with only markers". Right-click any point → Add Trendline → Linear → tick "Display Equation on chart" to see the regression equation.

Visual Examples — What Each Chart Looks Like

The pictures below are drawn from the same small datasets used above, so you can match each chart to the numbers behind it.

Column chart — Yearly Sales 200250300 280350 202120222023 20242025
Bar height = value. Use a column/bar chart to compare a quantity across categories or years.
Line chart — Sales Trend 202120222023 20242025
Same five numbers, joined by a line. Use a line chart to show a trend or movement over time (continuous data).
Pie chart — Monthly Budget Food — 40% Rent — 30% Education — 20% Savings — 10%
Values 4000, 3000, 2000, 1000 shown as slices. Use a pie chart for parts of a whole (≤ 6 categories that add to 100%).
Scatter — Hours vs Marks Study hours → Marks →
Each dot is one student (hours, marks); the red line is the fitted trend. Use a scatter plot to show the relationship between two numeric variables.
Histogram — Distribution of Marks 489 621 ≤4040–5050–60 60–7070–80>80
Bars touch (the variable is continuous) and their heights are the class frequencies 4, 8, 9, 6, 2, 1. Use a histogram to show the shape of one continuous variable's distribution.

2. Frequency Tables with COUNT Functions

FunctionPurposeExample
=COUNT(range)Count numeric values=COUNT(A2:A100)
=COUNTA(range)Count non-empty cells (text too)=COUNTA(B2:B100)
=COUNTBLANK(range)Count empty cells=COUNTBLANK(C2:C100)
=COUNTIF(range, criteria)Count cells meeting one condition=COUNTIF(A2:A100, ">50")
=COUNTIFS(r1,c1, r2,c2,…)Multiple conditions=COUNTIFS(A2:A100,"M", B2:B100,">35")
EXAMPLE 1

Marks in A2:A50. To count students who passed (marks ≥ 35): =COUNTIF(A2:A50, ">=35").

EXAMPLE 2 (Two conditions)

Count male students who scored ≥ 75: =COUNTIFS(GenderRange, "M", MarksRange, ">=75").

3. FREQUENCY Function (for Grouped Data)

=FREQUENCY(data_array, bins_array)

Returns counts of values falling in each bin (≤ bin boundary). Must be entered as an array formula (Excel 365 spills automatically; legacy Excel needs Ctrl+Shift+Enter).

Procedure

  1. Enter raw data in column A (say A2:A51).
  2. Enter upper bin limits in column C (say C2:C8): 30, 40, 50, 60, 70, 80, 90.
  3. Select cells D2:D9 (one extra for the "above last bin" overflow).
  4. Type =FREQUENCY(A2:A51, C2:C8) and press Ctrl+Shift+Enter (legacy) — or just Enter in Excel 365.
  5. Excel returns counts for each bin.
EXAMPLE 1

30 students' marks (e.g., 45, 52, 38, …, 65). Bins (upper limits): 40, 50, 60, 70, 80. =FREQUENCY(marks, bins) returns counts for ≤ 40, (40, 50], (50, 60], (60, 70], (70, 80], > 80 — e.g., 4, 8, 9, 6, 2, 1.

EXAMPLE 2

Number of children per family: data in A2:A21; bins 0, 1, 2, 3 in C2:C5. FREQUENCY gives counts of 0, 1, 2, 3, 4+.

4. PivotTables — Powerful Summarisation

DEFINITION

A PivotTable dynamically summarises large amounts of data by grouping rows, columns, and aggregating values (sum, count, average, etc.) — without writing formulas.

Creating a PivotTable

  1. Ensure the source has headers in row 1 and no blank columns.
  2. Click anywhere in the data → Insert → PivotTable.
  3. Choose location (New Worksheet recommended). Click OK.
  4. Drag fields into the four areas:
    • Rows — categorical variables to break down rows.
    • Columns — categorical variables to break down columns.
    • Values — numeric variable to aggregate (Sum, Count, Average, …).
    • Filters — top-level filter dropdown.
  5. Right-click a value cell → Value Field Settings → choose aggregation function and number format.

Common Operations

EXAMPLE 1

Sales data with columns: Date, Region, Product, Salesperson, Amount.

EXAMPLE 2 (Average grade per section)

Student data with Section, Gender, Marks. PivotTable: Rows = Section, Columns = Gender, Values = Average of Marks. Drag and the cross-tab of mean marks appears.

5. PivotCharts

A PivotChart is a chart linked to a PivotTable — when you slice or filter the PivotTable, the chart updates automatically.

  1. Click inside the PivotTable.
  2. PivotTable Analyze tab → PivotChart → choose chart type.
  3. Resize and format like any chart.
  4. Use Slicers to filter both table and chart together.

Best Practices for Visualization

Key Take-aways