Ravindra BagaleCourses & study guides मराठी Track your progress

6. Tables, Sorting and Filtering

Excel

6.1 Excel Tables (Ctrl + T)

Give the order list a named boundary

A fictional Swiggy restaurant partner keeps a worksheet of practice orders. Each row needs a quantity, a unit price and a calculated line amount. New orders arrive every day. A Table gives those records a managed boundary and lets a later formula refer to an Amount column by name.

All orders, locations and prices in this exercise are made up. They illustrate how to use Excel and do not describe Swiggy's records, prices or software. Use a scratch workbook so you can test table creation, expansion and conversion without changing an active report.

Know what Excel manages when you create a Table

  • The header. One row provides the column names. These labels appear in formulas such as the current row's Qty. The header itself is not an order.
  • The records. The selected data rows are members of the Table. If you append a row, confirm whether it entered that membership. The fact that it appears below another row is only a clue.
  • The features. The Table can show filter buttons, support named-column references, use calculated columns, and show an optional Total Row. Excel may adjust formatting and references when the Table grows.
  • The workbook name. A Table has its own name, which is separate from the worksheet tab's name. You can reference a Table from a formula on another sheet using that name and its column label.

A worksheet can contain a range that looks like a table because it has borders and shading. The Table object is a specific Excel structure. Click inside the intended rows and look for the contextual design controls, the object name and the verified range. These are better evidence than a colored stripe.

Headers are in row 1, four table records are in rows 2 through 5, and the next blank row 6 must be verified before treating it as a table member.
Confirm that the selected Table contains its header and every intended record. Leave worksheet titles and unrelated notes outside it.

Prepare the source before opening Create Table

Copy the list to a new tab named Orders. Place field names in row 1 and start the data in row 2. Avoid merging header cells. A merged title across the top is often intended for a person, while Table headings must identify their individual fields. If the sheet needs a dashboard title, reserve a separate area outside the Table.

Check one record at a time

  1. One order ID identifies one row in the fixture. If a real export stores one line per item, you'll have a different population. The Table can store either, and a count of order IDs might need a distinct calculation in the second design.
  2. Quantity and Unit Price are numbers. Enter 80 as a numeric value and apply currency formatting afterward. A numeric-looking text input can interfere with numeric totals or sorting.
  3. Keep descriptions, statuses and IDs as text. An ID such as SW-2101 differs from a numeric quantity. A source field with leading zeros needs the intended text type before entry or import.
  4. Keep each required header unique and meaningful. Some clients can supply default or adapted names for missing and duplicate fields. The created names are what formulas refer to. Inspect them after conversion.
  5. Remove decorative blank separator rows from this record list. An individual field can legitimately be empty. A wholly blank row can interfere with automatic range detection and confuse the boundary.

Choose the exact selection if the sheet has nearby data

Excel can suggest a region when you start in an existing dataset. Confirm the proposed bounds in the dialog. An adjacent note or extra summary may be guessed as data. A blank separator can cause the suggestion to stop early. Select the full intended range explicitly if the proposed area does not match it.

Create, identify and name the Table

Use the Insert menu's Table command or a supported Format as Table action. For Excel on Windows desktop, Microsoft documents Ctrl+T to open the Table dialog. In the Mac desktop shortcut documentation, Command+T or Ctrl+T can create a Table. Your browser may give the same keys another meaning in Excel for the web. The menu is a reliable place to look for the supported creation command.

  1. Select the known header and record range. In the dialog, inspect the address before you confirm it. The first row provides the field names for the lesson.
  2. Select the option that says your table already has headers. If you leave it unchecked, Excel can assign placeholder labels and treat your original text as part of the data. Verify which row the Table uses for labels.
  3. Click a data cell and locate the Table Design controls, called the Table tab in many Mac versions. Ribbon names can vary. Change the table name to tblOrders on a client that supports renaming.
  4. Click outside the Table, then click back inside it. Confirm the specific table design controls appear again and the intended name is shown. This checks that you are working with the Table object you just created.

A name such as tblOrders helps when there are also Tables for stores or products. Start names in these exercises with a letter, use readable words, and avoid spaces or cell-reference-like names. Table names are unique across the workbook without case differences. The text headings can still contain spaces. That is why a formula may refer to the column labeled Unit Price with bracket syntax.

Microsoft documents table renaming on Windows and Mac desktop. Its dedicated web renaming article currently describes a limited rollout. If the browser client leaves you with a default name such as Table1, use the actual generated name in the page's formulas or switch to a desktop client to carry out the named version of the lab. Do not type a name into a formula that your workbook never assigned.

Lab 1 · Create a Table and prove two added records joined

Use a fresh sheet called Orders. Enter the five headers and four starting records below. The first two fields and Status are text. Qty and Unit Price are numbers. Leave column F available for a derived amount. Clear unrelated neighboring cells in the scratch workbook so the intended member range is easy to see.

Enter A through E first. Verify the expected derived amounts after adding column F.
RowA Order IDB AreaC QtyD Unit PriceE StatusF Expected Line amount
2SW-2101Kothrud280Delivered160
3SW-2102Baner1120Cancelled120
4SW-2103Kothrud360Delivered180
5SW-2104Camp275Delivered150

Build the starting Table

  1. Select A1:E5 and create the Table with existing headers. Use tblOrders if the name is available. Verify the four Order IDs stay in the data and the actual header says Order ID.
  2. Enter Line amount in F1, immediately to the right of Status. Excel may expand the Table to include the new adjacent column. If needed, use the available resize controls and set the area to A1:F5. Confirm Line amount belongs to the Table before entering a row-specific formula for it.
  3. Enter =[@Qty]*[@[Unit Price]] in F2. Qty and Unit Price come from the same current record. Square brackets enclose the field names. Excel can populate the whole calculated column automatically. Verify the other three results, and use a supported fill action if the client does not fill the column as expected.
  4. In H2, away from the Table's immediate edge, enter =SUM(tblOrders[Line amount]). In H3 enter =COUNT(tblOrders[Line amount]). Expect a listed amount of ₹610 and four numeric amounts. The Cancelled order is still part of the source and contributes to this gross listed amount.
  5. Check a conditional measure separately: =SUMIFS(tblOrders[Line amount],tblOrders[Status],"Delivered") returns ₹490. This report applies a condition rather than trusting the viewer to have set the right filter.

Append two exact rows and inspect their new formulas

  1. In A6 through E6 type SW-2105, Baner, 4, 50 and Delivered. If Excel does not add the row to the Table automatically, resize through F6. Confirm F6 has the row formula or fill it in from the calculated rule. The new line amount is ₹200. The gross becomes ₹810, the numeric count becomes five and the delivered amount becomes ₹690.
  2. In A7 through E7 type SW-2106, Camp, 1, 90 and Returned. Confirm membership through F7 and the numeric result of ₹90. Gross becomes ₹900 and the numeric count becomes six. Delivered amount remains ₹690 because the new row is outside that measure's condition.
  3. Before relying on the report, inspect the exact Table boundaries. The two visible records are members only if the Table includes them. Write down the new last data row, the last Order ID and the value from its calculated cell.
  4. Compare the printed total with the sum of the original four and the two additions. The Table's written summary reference is still the same named column. Membership and correct calculations on the two newly added rows explain why the total moved.
The four original orders total 610 rupees. One verified added row increases the total to 810 and the next increases it to 900.
Prove each new row's amount and membership. One more calculated row does not guarantee the next will join or fill correctly.

Walk through the fifth order

  1. Read the original setup

    Four orders fill A1:F5 including headers. Their line amounts sum to ₹610.

  2. Add the source fields

    SW-2105 enters row 6 with quantity four and unit price ₹50. The cells are visible on the sheet.

  3. Confirm membership and calculation

    Check that the Table reaches F6 and that the formula returns 4 times 50, or ₹200. Fill the formula only if needed.

  4. Compare the totals

    The same structured sum now reads five row amounts and returns ₹810. Its verified increase is the new line amount.

Use the two appended records to spot different failures. If the Table membership stops at row 6, neither source amount nor formulas in row 7 count in the Table summary. If membership reaches row 7 but F7 is blank, the source is present and the calculation is missing. Compare the order ID count with the numeric line amount count to tell which condition you have.

Lab 2 · Use two independent Tables and inspect a conversion

A practice pickup workbook has store information on one sheet and product stock on another. Those are two different record collections. Give them separate Table names so a short summary can make clear which one it reads. This exercise also shows how to recognize a styled range after the Table structure is removed in a disposable copy.

Build a Stores Table and a Products Table

In a fresh workbook, make a Stores tab with headers Store ID, Area and Status in A1:C1. In rows 2 through 4 enter the three fabricated store records. For your second list, create a tab named Products with headings SKU, Product and On Hand. Enter the inventory fixture in the second table below. A stock amount here is a count of items.

Stores list in A1:C4.
Store IDAreaStatus
ST-101KothrudActive
ST-102BanerActive
ST-103CampReview
Products list in A1:C4.
SKUProductOn Hand
PROD-01Grocery box10
PROD-02Meal card6
PROD-03Snack pack8
  1. Convert Stores A1:C4 to tblStores and Products A1:C4 to tblProducts. Verify the separate Table design names and remember that selecting a worksheet tab does not by itself identify a Table.
  2. On a new worksheet named Checks, use =COUNTA(tblStores[Store ID]). It gives three. Use =SUM(tblProducts[On Hand]) separately. It gives 24. The two lists have no automatic relationship. Each summary names precisely the Table it needs.
  3. If your client supports renaming, change tblStores to tblPickupStores. Inspect the standard structured formula on Checks after renaming. It should reflect the new Table name and keep the same three rows. The stock sum remains 24. Queries or other dependent reports can require their own update checks.

Observe how a formatted range differs after conversion

  1. Save an expendable copy of the workbook. On Stores, select the renamed Table and use the supported Convert to Range command. Inspect the old list. Its values and some visual formatting can remain. The Table name and Table controls for that region are gone.
  2. Read the existing store count formula on Checks. Excel converts its structured reference to a regular cell reference to the existing data. It should still count three occupied IDs. Check the source address rather than expecting an exact display of padding or dollar signs in the formula.
  3. Type ST-104, Hadapsar and Active into A5:C5 on Stores. Read the now-ordinary reference again. If it still ends at row 4, the fourth ID is outside the count. The data can look much the same while the object-level behavior changed.
  4. To continue using a Table in this practice copy, select A1:C5 and create one. Give it an available name. Update the Checks formula to refer to the newly created Table's Store ID column. Verify four and check that the independent Products summary is still 24.

Maintain the Table when one feature changes

Keep the workbook reference stable as the dataset moves

A summary can read the Table by name from another worksheet. The heading used by the formula must reflect the Table's current name and field labels. Renaming a Table and changing a column heading are different operations. In your copied workbook, inspect a standard worksheet formula after either type of change. When you use copied formulas or another workbook, verify that those names actually resolve in the destination.

Check formula propagation when a new row or field enters

Entering a formula in one new Table column can establish a calculated column. Existing exceptions, pasted values or worksheet settings may leave some rows different from the intended calculation. Compare the first, last and recently appended rows. For a numeric total, check its count alongside the sum. A single formula result does not prove the rest of the column was filled.

Use a style as a reader aid

A table style can make headers and alternating rows easier to scan. Header visibility, filter buttons and the Total Row are configurable in supporting clients. Turn on features the workbook actually needs. If a worksheet suppresses header buttons for presentation, check its structure through the design controls instead of assuming a missing arrow means it is an ordinary range.

Style, membership and formula behavior deserve separate tests. If you change style only, the Table's expected row count and amount remain the same. If you expand the Table, the object bounds should change. If a calculation rule changes, prove one affected row with source values you know.

Test the boundary when typing or pasting

In a shared workbook, adding data might mean typing directly below the table, inserting a table row, or pasting a rectangular block. These operations can affect membership differently. Use the exact method your co-workers will use and inspect what the Table recognizes before assuming that the report changed correctly.

Use the location of a record as a controlled test

Make a separate copy of the four-row starting order fixture. Leave its next data row empty. Place a record one row lower than that next position, leaving the intervening blank row. The gap makes it unsafe to assume that the new row joined the existing Table. Check the design range. To include the new record, move it into the next intended position or explicitly resize after deciding whether the empty row should be part of the list. For this practice file the working Table should contain continuous order records with no separator rows.

Now repeat the append in an expendable copy with two rows of values pasted starting at the first empty row under the Table. Compare the Table's current address and the identities of its last two records. Verify how far the formatted styles and calculated formulas follow. If the pasted block includes an additional field beyond the existing width, Microsoft's documentation notes that rows can extend without extra columns automatically joining. Inspect the full destination and explicitly resize to include a new column when it belongs there.

  • Copy only intended fields. In Lab 1 the first five columns are source details and F is calculated. Pasting a larger rectangle can include values that overwrite a derived field. Keep calculated columns separate from raw export data unless the task explicitly supplies those values.
  • Check the new headers. When adding a column, confirm its exact heading text after expansion. A structured formula using Line amount expects that Table label. Different labels or trailing spaces can stop a typed reference from resolving as intended.
  • Keep the Table header anchored. Microsoft documents that a resize must overlap the old range and the header row cannot move up or down through that command. If the layout itself needs to change, give the new dataset a proper header region and check its formulas in a copy.
  • Distinguish the Total Row. If the optional Total Row is turned on, adding a record calls for inserting or extending the data area appropriately. Check that the new row is a data record. Leave the Total Row off for the simple append fixtures in this lesson.

After a paste, three results provide a focused check: the count of intended order IDs, the count of numeric calculated amounts and the sum of those amounts. If the order count grows by two and the numeric amount count grows by only one, inspect the new records rather than changing the formula's entire range.

Check the source shape without relying on a menu button

A Table is a rectangular container. A workbook still has other cells, and other cells can have data and formulas with a similar style. To distinguish them, use a consistent process with a small fixture. A written description of the expected area is useful even if one client's ribbon displays a different label.

  1. Count the header fields. In the Orders exercise the initial Table has five columns. Once Line amount is a member, it has six. Read the visible header labels in their actual order.
  2. Count the intended records. Four orders plus one header should span rows 1 through 5. A worksheet with nearby data to the right can appear to start another list; confirm that it does not belong by checking the address.
  3. Look up a recognizable record while verifying values. SW-2103 has quantity three and unit price 60. Its amount is ₹180. An incorrect paste of a field into the next row might change that relation even though the Table still contains four numeric amounts.
  4. Check one value outside the proposed area. Put an unrelated note in H1 and confirm it does not enter the Table. The definition ends at F for this exercise. Keeping an empty spacer column reduces the chance of accidentally adding the note.
  5. Try the ordinary-range control. If you cannot find a Table name or a contextual design feature, inspect the selected cells and the formulas using them. A table-looking style may have been retained after a conversion.

Consider a deliberate bad start. Create the Table on a scratch copy using A1:E4 even though the fourth record is on row 5. Add Line amount to this too-short table and verify the first three line amounts. They sum to ₹460. The missing ₹150 belongs to SW-2104 on row 5. Once the Table includes that record and its amount formula, the total reaches ₹610. This shows why a valid formula and a visible design control do not prove that you started with the right address.

Verify the other reports that use the Table

The Orders Table can serve as source data for multiple outputs. Each connection has its own behavior when you add a row. A worksheet formula that directly references the Table's current Amount column can follow its membership. A different output might cache a summary or point to a fixed source despite sitting beside the Table. Verify each link in the intended workflow.

Check a simple chart with the existing worksheet data

In a scratch copy, start with the four original orders and their Line amount field. Make a simple column chart where order IDs label the categories and Line amount is the series value. Use the chart's source controls in your client to confirm which cells or Table data it reads. A graph can be formatted correctly and still draw old records from a fixed range.

Append SW-2105 and verify that the Table now has the new record and a calculated amount of ₹200. Inspect the chart and see whether the order label and bar are included. If they are missing, confirm the actual source ranges and adjust that chart or its selected fields as needed. A known category label is stronger evidence than assuming a modest change in bar count on a small phone screenshot.

Allow for refresh when preparing a summary report

A PivotTable can use an Excel Table as its source. Check the actual configured source and refresh the report when it requires it. A newly stored order in a Table does not prove that a previously generated summary has recalculated or refreshed. Before relying on it, compare to a plain Table sum or the specific conditional formula used by the same report.

When a validation list or another workbook is involved, confirm how its reference follows the Table before promising automatic updates. The next user should know which results are directly calculated from the current cells and which ones need a specific review action after adding records.

Check for incomplete records after a successful append

A Table can include a record whose source fields are still incomplete. The calculated column still runs. In a practice copy after Lab 1, clear D7, the unit price for SW-2106. The unguarded multiplication in F7 treats an empty reference as zero in this arithmetic, so the new line can show a numeric zero. The Table still has six order IDs and the numeric line count can still be six. This case proves why a count and a Table boundary cannot validate every source input on their own.

Inspect the raw fields when the business meaning matters

  1. Place =COUNT(tblOrders[Unit Price]) next to the order ID count. With the price cleared, only five of the six price entries are numeric. This reveals the missing input in the fixture even if the calculated amount uses zero.
  2. In a scratch copy, make a helper that labels a numeric Qty and Unit Price pair as ready, and flags other pairs for review. Use =IF(AND(ISNUMBER([@Qty]),ISNUMBER([@[Unit Price]])),"Ready","Review input"). Check the row with its price cleared. It should show Review input.
  3. Restore the verified unit price of 90. The row-level helper returns Ready, its amount returns 90 and the gross gives 900. A report owner might also require positive quantities or documented zero-priced records. Those checks need their own agreed rules beyond the type test.

If a printed or shared report uses amounts from a partial import, state how many rows are unresolved. A total without that information may look complete. The advantage of a separate quality field is that a coworker can filter to the Review input rows and correct them at the source while keeping the accepted numeric calculations visible.

Hand the workbook to someone who did not build it

When someone opens a workbook with several Tables, give them a short map of where the source fields and checks live. In the exercises, the Orders collection is meant to grow downward, while Stores and Products describe other lists. The name identifies the object and the worksheet tab helps users find it. These two names can be different. A description such as “tblOrders on the Orders tab” prevents confusion when a copied workbook has more than one sales tab.

Use a traceable name and a harmless test row

On supported desktop clients, Microsoft documents selecting a table name from the address control near the formula bar to jump to that table. Try it with Stores and then Products in the named workbook. Read one field at the destination each time. This is a navigation check; use the Table Design controls and the counted rows for a membership check. An allowed name should identify the intended object without requiring somebody to guess which default table number Excel assigned.

  1. Leave a little space for expected growth. In a practice workbook a new Table field can be added to the right, and new records can be added below. A second Table, merged display heading or summary field too close to that boundary makes expansion harder to inspect.
  2. Choose an agreed append sequence. Enter source inputs first, check the dynamic region and line formulas, then compare the counts and amount. A teammate can repeat this on the fifth and sixth practice rows and expect different effects on the delivered total.
  3. Check which reports you expect to refresh. Record the structured sum, ID count and any chart or summary that reads the Table. Put a source note beside each result identifying its actual population.
  4. Keep a small known baseline. When a batch contains forty records, find at least one verifiable low-value and one distinctive high-value order to inspect. A single summary number cannot establish that quantity, price, area and status remained attached to the correct IDs.

For a final practice handoff, tell a partner to add a new delivered order with quantity two and unit price 45 to the expanded Orders Table. They should be able to explain the expected ₹90 line, a gross increase to ₹990 and a delivered increase to ₹780, once the workbook confirms the new record's membership and formula. Restore the original six-row test or save this variation under a distinct name.

Ask for the difference between the two final totals in that variation. Gross exceeds delivered by ₹210, which comes from the original cancelled line of ₹120 and the returned line of ₹90. This proves that the conditional check still uses the intended status after another append.

Quiz · check the Table, then the report

What range includes the five original headings and four records?

A1:E5. Row 1 supplies the headers, and rows 2 through 5 supply the records. Line amount is added as a sixth column when you explicitly include F.

How does adding SW-2105 change the gross amount?

After the row becomes a Table member and its line formula returns ₹200, the gross rises from ₹610 to ₹810. A value visible on the sheet without membership would not contribute to the structured sum.

The second appended row was Returned. Which total should include it?

Gross listed amount includes the ₹90. The delivered-only calculation keeps ₹690 because the added status does not meet its criterion. Both values need clear labels.

What can tell you whether an ordinary-looking region is really a Table?

Check the contextual Table tools, the object name and the selected area. A visual style alone can be misleading, especially after converting a Table back to a range.

What happens to a standard structured reference after Convert to Range?

Excel changes it to a regular cell reference to the existing data. The original count can still work for those cells. Inspect its boundaries before assuming it also follows future rows.

Does an Excel Table guarantee a valid Unit Price on each new row?

The Table determines which records belong. It does not know the source's intended business rules. In the cleared-price case, verify the raw type and the row calculation before publishing the amount.

Interview practice · explain the evidence for a growing source

How do you prepare a source before creating a Table?

I keep one labeled column per field and one clear record per row, check value types, and leave unrelated notes and merged titles outside the data. I confirm the full intended range and the header option before creating the Table.

How would you verify that a pasted set of rows joined?

I would inspect the Table address, check the final IDs and compare the new numeric count and total against known added records. If the new values remained outside, I would fix the destination or resize the Table into the intended cells.

What is a calculated column and why check it after growth?

It applies a row rule using fields such as this row's quantity and unit price. The Table can propagate its formula. I would still inspect the appended rows and compare known outputs, since a pasted override or incomplete source can change the resulting amount.

Why give two Tables different meaningful names?

One source can represent stores and another products. Meaningful unique names tell collaborators which object a formula reads. I would verify the name using the design controls and check one result from each source.

How would you validate a chart or PivotTable after adding rows?

I would confirm the exact data source, check the new rows became members, and refresh the summary if required. I would verify a distinctive new label or numeric contribution rather than relying on a seemingly updated appearance.

Six cards for a correctly defined Table

  • Range Explicitly select every intended header and record. Verify first and last rows.
  • Headers Keep meaningful and unique field names in one labeled row.
  • Table name Use a distinct workbook name and read it from the Table controls.
  • Calculated column Check a known formula and its result after an append.
  • Growth Verify membership includes the new row or column before trusting summaries.
  • Convert to Range The styling and data can remain while Table features and reference behavior change.

Continue with structured references to read the brackets and row specifiers. Revisit the chapter overview for the shared Dispatch dataset used by later reporting exercises.

Microsoft references

Continue practising: explore the existing Excel Task Hub for additional exercises.