Skip to main content
Menu
Back to Component 2

Excel skills · Accommodation Bookings 2026

How to build three graphs with COUNTIF

COUNTIF counts how many cells in a range match a value. Put those counts in a small table, then chart the table. Each graph below uses the Dataset sheet, rows 3 to 52.

Graph 1

Booking method rating (column chart)

Counts how many bookings gave each rating from 1 to 5.

  1. On the Dashboard sheet, type the ratings 1 to 5 down a column, with a header above.
  2. In the cell next to rating 1, enter the formula below. Change the last number for each row.
  3. Add a Total row with =SUM(...). It should equal 50, the number of bookings.
  4. Select the ratings and the counts, then choose Insert > Column Chart.
  5. Add a chart title and axis titles, then use Chart Design to pick bright colours.
=COUNTIF(Dataset!J3:J52,1)
RatingFormulaAnswer
1=COUNTIF(Dataset!J3:J52,1)2
5=COUNTIF(Dataset!J3:J52,5)20
Graph 2

Booking method (pie chart)

Counts text instead of numbers, so the criteria go inside quotation marks.

  1. Type Online and Shop in two cells.
  2. Next to each, enter COUNTIF on the Booking method column (I).
  3. Select the two names and counts, then choose Insert > Pie Chart.
  4. Turn on percentage data labels so each slice shows its share.
=COUNTIF(Dataset!I3:I52,"Online")

Quotation marks are needed for text criteria. Numbers such as 5 do not need them.

Graph 3

Bookings by season type (wildcard)

The season column has names like Peak Season 1, Peak Season 2 and Peak Season 3. A wildcard * counts them all together.

  1. Type Peak, Mid and Low in three cells.
  2. Enter the formula below, with the word followed by *.
  3. Check the three counts add up to 50.
  4. Select the table and choose Insert > Column Chart. Add titles and bright colours.
=COUNTIF(Dataset!B3:B52,"Peak*")

Always check your range ends on the last data row (52). A range that stops one row early gives a total of 49.

Check your charts

Every chart needs a clear title, axis titles, a y-axis starting at 0 and counts that add up to 50. Try the Spot the Graph Errors task to practise finding mistakes.