📘 CodingMarble Learn

Spreadsheets: Calculate, Chart and Sort Data

A spreadsheet is a table of cells where formulas and functions calculate for you. Change one number and every result updates. You can make charts, sort, filter, add subtotals, test what-if ideas, work out loans and keep a simple one-table database.

🎬 Step-by-step story

  1. A spreadsheet is a grid. Columns have letters, rows have numbers, and a cell is named by both: B3.
  2. Put data in cells: names, quantities and prices. Text and numbers are different.
  3. A formula starts with =. =B2*C2 gives the total. Fill down copies it to every row.
  4. Functions work on a range: SUM, AVERAGE, MAX, MIN, COUNT. D2:D5 is a range.
  5. A chart turns numbers into bars. When a number changes, the bar changes too.
  6. Play: sort, filter and test what-if. Change a price and see all results move.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

What is the difference between a cell and a range?

A cell is one box (B3). A range is a block of cells (D2:D5).

Why can a number not be added if it is stored as text?

The sheet treats text as words. Numbers must be entered as numbers.

Why does the formula change when I fill down?

References are relative: B2 becomes B3 one row down. Use $ to keep a cell fixed.

Which function should I use for the biggest number?

MAX. For the smallest use MIN.

Why do bars change when I change a number?

The chart reads from the cells. Same source, so it follows.

Does a filter delete rows?

No. It hides them. Clear the filter and they return.

Cells, rows, columns and addresses

A spreadsheet (table processor) is a program with a grid of cells. Each column has a letter, each row a number. The cell B3 is where column B and row 3 meet. A group of cells is a range, written like D2:D5. One file is a workbook that may have many sheets.

Formulas and cell references

A formula begins with = and uses cell names and operators: =B2*C2. It updates by itself when B2 or C2 changes. A relative reference (B2) shifts when you copy the formula down. An absolute reference ($B$2) stays fixed, for a value such as a tax rate kept in one cell.

Mathematical and statistical functions

A function is a ready formula. =SUM(D2:D5) adds, =AVERAGE(D2:D5) gives the mean, =MAX() the biggest, =MIN() the smallest, =COUNT() how many numbers, =IF(D2>100,"high","low") picks one of two answers. Function names stay in English even in a Hindi sheet.

Charts and presenting numeric data

Choose the chart for the question: a column or bar chart compares items; a line chart shows change over time; a pie chart shows parts of a whole (use only when parts add to 100%). Give the chart a title, label axes with units, and use few colours. A good chart answers one question at a glance.

Sorting, filters and subtotals

Sort puts rows in order (A to Z, small to big). Always select the whole table so rows stay together. A filter shows only rows that match a rule, for example Total above 100; the other rows are hidden, not deleted. Subtotals add a total for each group after sorting by that group.

Modelling, optimisation and what-if

A model is a sheet where inputs (price, quantity) feed formulas that give results (profit). Change an input to try a what-if. Goal Seek works backwards: you give the target (profit = 500) and it finds the input. For equations such as 3x + 2 = 20, put the left side in a formula and use Goal Seek. The Solver tool finds the best choice under limits (optimisation).

Matrices, linear systems and money formulas

Matrix functions work on blocks of cells: MMULT multiplies, MDETERM gives the determinant, MINVERSE the inverse. To solve a linear system A·x = b, use =MMULT(MINVERSE(A), b). Money functions: =FV() future value, =PMT(rate, n, loan) the instalment. Compound interest: =P*(1+r)^n.

A sheet as a one-table database

A table with one record per row and one field per column (name, class, marks) is a simple database. Keep one kind of data in each column, no empty rows, and a header row. Then sorting, filters, COUNTIF, SUMIF and lookup functions answer questions such as "how many students scored above 80?".

Key formulas and definitions

Worked examples

1. Qty is in B2:B5 and prices in C2:C5. Write the formula for the bill of row 3.

=B3*C3

2. Totals in D2:D5 are 50, 160, 240, 180. Write the formulas for the sum and the highest total and give the results.

=SUM(D2:D5) gives 630. =MAX(D2:D5) gives 240.

3. A loan of 12000 at 1% a month for 12 months: which function gives the monthly instalment?

=PMT(0.01, 12, -12000), about 1066. A minus sign on the loan gives a positive instalment.

Common mistakes

Practice quiz

1. In B3, which part is the column?
2. =AVERAGE(2,4,6) gives:
3. A filter ...
4. Which chart shows change over time?
5. $B$2 is a(n):

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

Is a spreadsheet the same as Excel?

Excel is one spreadsheet program. Others are LibreOffice Calc and Google Sheets. The ideas are the same.

Why does my formula show the text and not the number?

You forgot the = at the start, or the cell is set to text format.

What is the difference between sort and filter?

Sort changes the order; a filter hides rows that do not match a rule.

Learn first

Learn next

Related lessons

All Computer Science lessons