Lesson 1: Logical formulas with IF, IFS, AND and OR
A logical test is a comparison that is either TRUE or FALSE, such as B2>=50000 or D2="North". You already know that IF returns one value when the test is TRUE and another when it is FALSE. This lesson shows how to check several things at once.
| Function | Returns TRUE when… | Example |
|---|---|---|
| AND(test1, test2, …) | every test is TRUE | =AND(B2>=50000,C2>=12) |
| OR(test1, test2, …) | at least one test is TRUE | =OR(B2>=50000,C2>=20) |
| NOT(test) | the test is FALSE (it flips the result) | =NOT(D2="South") |
AND and OR can take up to 255 conditions, but Microsoft advises using only a few so the formula stays easy to read. NOT takes only one condition. Put AND, OR or NOT inside IF to choose a result: =IF(AND(B2>=50000,C2>=12),"Bonus","No bonus").
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Name | Sales | Accounts | Gewest |
| 2 | Ana | 52000 | 14 | North |
| 3 | Ben | 47500 | 22 | South |
| 4 | Chloé | 61000 | 9 | North |
| 5 | Dev | 39000 | 18 | East |
| 6 | Eli | 58000 | 25 | South |
| 7 | Fatima | 45000 | 11 | East |
Watch the comparison signs
> means "greater than", so 40>40 is FALSE. Use >= when the limit itself should count. Text in a formula needs double quotation marks. If you type =IF(D2=North,…) without quotes, Excel reads North as a name and usually shows #NAME?.
Nested IF and IFS
To choose between more than two results, you can put one IF inside another: =IF(B2>=60000,"Gold",IF(B2>=50000,"Silver","Bronze")). Excel stops at the first TRUE test, so order matters. If you test B2>=50000 first, a 61,000 sale returns "Silver" and never reaches the Gold test. Always start with the strictest test.
IFS is easier to read. It takes pairs of test and result: =IFS(B2>=60000,"Gold",B2>=50000,"Silver",TRUE,"Bronze"). It can test up to 127 conditions. If no test is TRUE, IFS returns #N/A, so add TRUE as the last test to give a default result. IFS is in Excel 2019 and later, including Microsoft 365.
IF can also do math. =IF(B2>40,(B2-40)*C2*1.5,0) pays time-and-a-half only on hours over 40. 44 hours at $22 gives (44-40) x 22 x 1.5 = 132; exactly 40 hours gives 0.
Practical exercise: build an attendance summary
Copy this monthly attendance sheet into Excel. Scheduled is the number of shifts booked, Present is the number worked, and Late is the number of late arrivals. Fill columns F to H with formulas.
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Name | Dept | Scheduled | Present | Late | Rate | Rating | Flag |
| 2 | Amrit | Security | 20 | 20 | 0 | |||
| 3 | Bella | Security | 20 | 18 | 3 | |||
| 4 | Carlos | Office | 18 | 17 | 1 | |||
| 5 | Divya | Office | 18 | 15 | 0 | |||
| 6 | Erin | Security | 20 | 19 | 4 | |||
| 7 | Farid | Warehouse | 22 | 22 | 1 | |||
| 8 | Gwen | Warehouse | 22 | 20 | 2 |
In F2, work out the attendance rate and fill it down to F8. Format the column as Percentage.
Toon antwoord
=D2/C2. Amrit gets 100%, Bella 90%, Carlos 94.4%, Divya 83.3%, Erin 95%, Farid 100% and Gwen 90.9%.
In G2, use IFS to show "Excellent" for 95% or more, "Good" for 90% or more, and "Review" for anything lower. Fill down.
Toon antwoord
=IFS(F2>=0.95,"Excellent",F2>=0.9,"Good",TRUE,"Review"). Results: Amrit Excellent, Bella Good, Carlos Good, Divya Review, Erin Excellent, Farid Excellent, Gwen Good. Erin is exactly 95%, and >= includes it.
In H2, show "Talk" if the rate is below 90% OR the person was late 3 or more times; otherwise "OK". How many people get "Talk"?
Toon antwoord
=IF(OR(F2<0.9,E2>=3),"Talk","OK"). 3 people get "Talk": Bella, Divya, Erin. Bella and Erin have good rates but were late 3 or more times.
Write one formula that counts Security staff rated "Excellent".
Toon antwoord
=COUNTIFS(B2:B8,"Security",G2:G8,"Excellent") returns 2 (Amrit and Erin).
Lesson 2: Conditional totals with SUMIFS, COUNTIFS and AVERAGEIFS
The IFS functions answer questions like "How much did Ana sell?" or "How many North orders were Alarms?" without sorting or filtering. A row is included only when all the conditions are true.
| Function | Syntax | What it does |
|---|---|---|
| SUMIFS | SUMIFS(sum_range, criteria_range1, criteria1, …) | Adds the cells in sum_range that meet every condition |
| COUNTIFS | COUNTIFS(criteria_range1, criteria1, …) | Counts rows that meet every condition |
| AVERAGEIFS | AVERAGEIFS(average_range, criteria_range1, criteria1, …) | Averages the cells that meet every condition |
| SUMIF | SUMIF(range, criteria, [sum_range]) | Adds with one condition; note that sum_range comes last |
Each function accepts up to 127 range/criteria pairs. Every range in the formula must have the same number of rows and columns, so Excel can compare the cells row by row. If no rows match, AVERAGEIFS returns #DIV/0!.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Datum | Rep | Gewest | Product | Units | Amount |
| 2 | 2026-03-02 | Ana | North | Cameras | 4 | 1200 |
| 3 | 2026-03-02 | Ben | South | Alarms | 10 | 850 |
| 4 | 2026-03-03 | Ana | North | Alarms | 6 | 510 |
| 5 | 2026-03-04 | Chloé | East | Cameras | 2 | 600 |
| 6 | 2026-03-05 | Ben | South | Cameras | 5 | 1500 |
| 7 | 2026-03-06 | Dev | North | Sensors | 12 | 360 |
| 8 | 2026-03-09 | Ana | North | Cameras | 3 | 900 |
| 9 | 2026-03-10 | Chloé | East | Alarms | 8 | 680 |
| 10 | 2026-03-11 | Dev | North | Alarms | 4 | 340 |
| 11 | 2026-03-12 | Ben | South | Sensors | 20 | 600 |
Writing criteria
- Text goes in quotes: "North".
- Operators go inside the quotes: ">=600", "<>Sensors" (not equal to Sensors).
- Wildcards: ? matches one character and * matches any number of characters. "?e?" matches Ben and Dev; "C*" matches anything starting with C. Put ~ before a real ? or *.
- Cell references: join the operator with &, as in ">"&H2. Writing ">H2" compares with the text H2.
- Dates: ">="&DATE(2026,3,9) and "<="&DATE(2026,3,12) give a date range that includes both ends.
"Or" questions
Because all conditions must be true, =SUMIFS(F2:F11,C2:C11,"North",C2:C11,"East") returns 0: no cell is North and East at once. To total North or East, add two formulas: =SUMIFS(F2:F11,C2:C11,"North")+SUMIFS(F2:F11,C2:C11,"East") returns 4,590.
Practical exercise: build a sales report with SUMIFS and COUNTIFS
Copy this sales log into Excel (column A holds real dates). Build a small report in columns H to J, then answer the questions with one formula each.
| A | B | C | D | E | F | G | H | I | J | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Datum | Rep | Gewest | Product | Units | Amount | Rep | Total | Orders | |
| 2 | 2026-03-02 | Ana | North | Cameras | 4 | 1200 | Ana | |||
| 3 | 2026-03-02 | Ben | South | Alarms | 10 | 850 | Ben | |||
| 4 | 2026-03-03 | Ana | North | Alarms | 6 | 510 | Chloé | |||
| 5 | 2026-03-04 | Chloé | East | Cameras | 2 | 600 | Dev | |||
| 6 | 2026-03-05 | Ben | South | Cameras | 5 | 1500 | ||||
| 7 | 2026-03-06 | Dev | North | Sensors | 12 | 360 | ||||
| 8 | 2026-03-09 | Ana | North | Cameras | 3 | 900 | ||||
| 9 | 2026-03-10 | Chloé | East | Alarms | 8 | 680 | ||||
| 10 | 2026-03-11 | Dev | North | Alarms | 4 | 340 | ||||
| 11 | 2026-03-12 | Ben | South | Sensors | 20 | 600 |
In I2, total the Amount for the rep named in H2. Write it so it can be filled down to I5.
Toon antwoord
=SUMIFS($F$2:$F$11,$B$2:$B$11,H2). Results: Ana 2,610, Ben 2,950, Chloé 1,280, Dev 700. The $ signs keep the ranges fixed when you fill down.
In J2, count the orders for the rep in H2 and fill down to J5.
Toon antwoord
=COUNTIFS($B$2:$B$11,H2). Results: Ana 3, Ben 3, Chloé 2, Dev 2.
How many camera units were sold in the North region?
Toon antwoord
=SUMIFS(E2:E11,C2:C11,"North",D2:D11,"Cameras") returns 7 (4 + 3).
What is the average amount of an Alarms order?
Toon antwoord
=AVERAGEIFS(F2:F11,D2:D11,"Alarms") returns 595 ((850 + 510 + 680 + 340) / 4).
What were total sales in the first week, March 2 to March 6, 2026?
Toon antwoord
=SUMIFS(F2:F11,A2:A11,">="&DATE(2026,3,2),A2:A11,"<="&DATE(2026,3,6)) returns 5,020.
Themaquiz 2: Conditional totals: SUMIFS, COUNTIFS and AVERAGEIFS
Lesson 3: Lookups with XLOOKUP, VLOOKUP, INDEX and MATCH
A lookup finds a value (such as a product code) in one column and returns the matching value from another column in the same row, such as its price.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Code | Onderdeel | Category | Price | Stock |
| 2 | CAM-01 | Dome camera | Cameras | 189.99 | 14 |
| 3 | CAM-02 | Bullet camera | Cameras | 149.5 | 0 |
| 4 | ALM-10 | Door sensor | Alarms | 24.75 | 120 |
| 5 | ALM-11 | Motion sensor | Alarms | 39 | 64 |
| 6 | LCK-05 | Smart lock | Locks | 229 | 8 |
| 7 | LCK-06 | Keypad lock | Locks | 119 | 22 |
XLOOKUP
=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode]). It uses an exact match by default. The return column can be on either side, so =XLOOKUP("Smart lock",B2:B7,A2:A7) returns the code LCK-05 from the column to the left. If nothing matches, XLOOKUP returns #N/A, unless you give if_not_found text such as "Not listed".
match_mode -1 means "exact match, or else the next smaller item". It is useful for rate tables: with tiers starting at 0, 10,000, 25,000 and 50,000, a sale of 32,000 gets the 25,000 rate. Match_mode 1 returns the next larger item, and 2 allows wildcards. XLOOKUP is in Excel for Microsoft 365 and Excel 2021 or later; it is not in Excel 2016 or 2019.
VLOOKUP
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]) searches only the first column of the table and looks left to right. col_index_num counts columns from the left of the table, starting at 1. =VLOOKUP("LCK-06",A2:E7,4,FALSE) returns 119.
- Use FALSE for an exact match. If you leave range_lookup out, VLOOKUP uses approximate match, which expects the first column to be sorted.
- #N/A means the value was not found (for example, a name searched in the code column).
- #REF! means col_index_num is larger than the number of columns in the table.
INDEX and MATCH
MATCH(lookup_value, lookup_array, 0) returns the position of a value, not the value: =MATCH("LCK-05",A2:A7,0) returns 5. Use 0 for an exact match; match_type 1 (the default) and -1 need sorted data. INDEX(array, row_num) returns the value at a position: =INDEX(D2:D7,3) returns 24.75. Together they work in any direction: =INDEX(B2:B7,MATCH(229,D2:D7,0)) returns Smart lock.
Handling errors
=IFERROR(value, value_if_error) returns your own value when a formula gives #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME? or #NULL!. =IFNA(value, value_if_na) replaces only #N/A, so other errors still show and you can fix them.
Practical exercise: complete an invoice log with lookups
Copy this invoice log into Excel. Columns J to L are the customer list, and K7 holds the "as of" date for checking overdue invoices. Fill columns E to H with formulas.
| A | B | C | D | E | F | G | H | I | J | K | L | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Invoice | Datum | Code | Amount | Customer | Terms | Due | Status | Code | Customer | Terms | |
| 2 | INV-101 | 2026-08-03 | C01 | 1250 | C01 | Northgate Condos | 30 | |||||
| 3 | INV-102 | 2026-08-10 | C03 | 640 | C02 | Riverside Plaza | 45 | |||||
| 4 | INV-103 | 2026-08-17 | C02 | 2300 | C03 | Prairie Clinic | 15 | |||||
| 5 | INV-104 | 2026-08-24 | C05 | 480 | C04 | Westview School | 30 | |||||
| 6 | INV-105 | 2026-09-01 | C01 | 900 | ||||||||
| 7 | INV-106 | 2026-09-08 | C02 | 1575 | As of | 2026-09-20 |
In E2, look up the customer name for the code in C2. Show "Check code" if the code is not in the list. Fill down to E7.
Toon antwoord
=XLOOKUP(C2,$J$2:$J$5,$K$2:$K$5,"Check code"). Results: Northgate Condos, Prairie Clinic, Riverside Plaza, Check code, Northgate Condos, Riverside Plaza.
In F2, use VLOOKUP to get the payment terms (days), and show 0 if the code is missing. Fill down.
Toon antwoord
=IFERROR(VLOOKUP(C2,$J$2:$L$5,3,FALSE),0). Results: 30, 15, 45, 0, 30, 45. FALSE asks for an exact match.
In G2, work out the due date and fill down. What is the due date for INV-101 and INV-103?
Toon antwoord
=B2+F2, formatted as a date. Adding a number to a date adds days. INV-101 is due 2026-09-02 and INV-103 is due 2026-10-01.
In H2, show "Overdue" if the due date is before the date in K7; otherwise "Open". Which invoices are overdue?
Toon antwoord
=IF(G2<$K$7,"Overdue","Open"). Overdue: INV-101, INV-102, INV-104. INV-104 is overdue only because its code (C05) is not in the list, so its terms are 0. Fix the code first.
What is the total amount invoiced to customer C02?
Toon antwoord
=SUMIFS(D2:D7,C2:C7,"C02") returns 3,875 (2,300 + 1,575).
Themaquiz 3: Lookups: XLOOKUP, VLOOKUP, INDEX/MATCH and IFERROR
Lesson 4: Text and date functions
Imported lists often have codes you need to split, names typed in different ways, and dates you need to count. Text functions return text, even when the result looks like a number (RIGHT("EDM-0087",4) returns the text 0087).
| Function | What it does | Example and result |
|---|---|---|
| LEFT(text, [num_chars]) | Characters from the start (1 if num_chars is left out) | =LEFT("CGY-0412",3) → CGY |
| RIGHT(text, [num_chars]) | Characters from the end | =RIGHT("CGY-0412",4) → 0412 |
| MID(text, start_num, num_chars) | Characters from the middle | =MID("RED-1150",5,2) → 11 |
| LEN(text) | Number of characters; spaces count | =LEN("Jo Tran") → 7 |
| TRIM(text) | Removes extra spaces, keeps single spaces between words | =TRIM(" Leo Martin ") → Leo Martin |
| PROPER / UPPER | Capital first letters / all capitals | =PROPER("jean-luc ROY") → Jean-Luc Roy |
| CONCAT(text1, …) or & | Joins text with nothing in between | =CONCAT("Priya","Nair") → PriyaNair |
| TEXTJOIN(delimiter, ignore_empty, …) | Joins with a separator and can skip empty cells | =TEXTJOIN(", ",TRUE,A2:A5) |
SEARCH(find_text, within_text) returns the position where text starts and ignores case: =SEARCH("lock","Smart Lock") returns 7. Use FIND when uppercase and lowercase must match. Both return #VALUE! if the text is not found.
How dates work
Excel stores dates as serial numbers: January 1, 1900 is 1, and each day adds 1. That is why =B2+30 gives a date 30 days later and =B2-A2 gives the days between two dates. When you join a date to text with &, Excel drops the date format and shows the number, so use TEXT: ="Due "&TEXT(B2,"yyyy-mm-dd"). TEXT also gives day names with "dddd". Its result is text, so keep the real date in another cell for calculations.
| Function | What it returns | Example and result |
|---|---|---|
| TODAY() | Today's date (it changes each day) | =TODAY()-A2 → days since A2 |
| DATE(year, month, day) | A date; extra months or days roll over | =DATE(2026,14,1) → 2027-02-01 |
| WEEKDAY(date, [return_type]) | Day number: 1 = Sunday to 7 = Saturday by default; type 2 makes Monday 1 and Sunday 7 | Monday March 2, 2026 → 2 |
| NETWORKDAYS(start, end, [holidays]) | Weekdays from start to end, counting both, minus holidays | March 2–13, 2026 with one holiday → 9 |
| EOMONTH(start, months) | Last day of the month, months before or after | =EOMONTH(DATE(2026,2,10),0) → 2026-02-28 |
| EDATE(start, months) | Same day, months before or after | =EDATE(DATE(2026,1,15),6) → 2026-07-15 |
| DATEDIF(start, end, unit) | Complete years ("Y"), months ("M") or days ("D") | June 15, 2019 to March 2, 2026, "Y" → 6 |
DATEDIF returns #NUM! if the start date is after the end date. Microsoft does not recommend its "MD" unit because it can give wrong results.
Practical exercise: analyze a shift schedule
Copy this September schedule into Excel. Column A holds real dates, and the guard names were typed in different ways. J2 holds a company holiday. Fill columns E to H with formulas.
| A | B | C | D | E | F | G | H | I | J | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Datum | Shift | Guard | Hours | Day | Type | Site | Name | Holiday | |
| 2 | 2026-09-04 | AIR-Day | ana silva | 8 | 2026-09-07 | |||||
| 3 | 2026-09-05 | MAL-Night | BEN COLE | 10 | ||||||
| 4 | 2026-09-06 | AIR-Day | ana silva | 8 | ||||||
| 5 | 2026-09-07 | HOS-Night | chen wu | 12 | ||||||
| 6 | 2026-09-08 | MAL-Day | Ben cole | 8 | ||||||
| 7 | 2026-09-12 | HOS-Day | dina roy | 12 | ||||||
| 8 | 2026-09-13 | MAL-Night | Chen Wu | 10 | ||||||
| 9 | 2026-09-14 | AIR-Day | DINA ROY | 8 |
In E2, show the day name for the date in A2 and fill down.
Toon antwoord
=TEXT(A2,"dddd"). Results: Friday, Saturday, Sunday, Monday, Tuesday, Saturday, Sunday, Monday.
In F2, show "Weekend" for Saturday or Sunday and "Weekday" otherwise. How many weekend shifts are there?
Toon antwoord
=IF(WEEKDAY(A2,2)>5,"Weekend","Weekday"). With return_type 2, Monday is 1 and Sunday is 7, so 6 and 7 are the weekend. There are 4 weekend shifts.
In G2, pull out the 3-letter site code from the shift in B2.
Toon antwoord
=LEFT(B2,3). Results: AIR, MAL, AIR, HOS, MAL, HOS, MAL, AIR.
In H2, clean the guard name so it has no extra spaces and has capital first letters.
Toon antwoord
=PROPER(TRIM(C2)). Every row becomes one of: Ana Silva, Ben Cole, Chen Wu, Dina Roy.
How many hours were worked on weekend shifts?
Toon antwoord
=SUMIFS(D2:D9,F2:F9,"Weekend") returns 40 (10 + 8 + 12 + 10).
How many working days does September 2026 have, leaving out the holiday in J2?
Toon antwoord
=NETWORKDAYS(DATE(2026,9,1),DATE(2026,9,30),J2) returns 21. September 2026 has 22 weekdays, and the holiday falls on a Monday.
Lesson 5: Conditional formatting, data validation and duplicates
Conditional formatting
Conditional formatting changes how cells look when they meet a rule. Find it on the Home tab, in the Styles group.
- Highlight Cells Rules: format values greater than, less than or between limits, dates, or Duplicate Values.
- Top/Bottom Rules: for example, Top 10 Items to highlight the highest values, or the bottom 10% of values.
- Data Bars: a coloured bar in each cell, longer for larger values.
- Color Scales: the cell colour shows where a value sits between the lowest and highest.
- Icon Sets: three to five groups of values, each with its own icon and threshold.
For your own rule, choose New Rule > Use a formula to determine which cells to format. Write the formula for the active cell (the first cell you selected) and use a relative reference: with B2:B20 selected, =E2>300 checks E2 for B2, E3 for B3, and so on. The formula must start with =. If you leave it out, Excel adds = and quotation marks, so the rule is read as text and does not work.
In Manage Rules, the newest rule is at the top by default. When rules conflict, the rule higher in the list wins. Use Move Up and Move Down to change the order, and tick Stop If True to stop checking lower rules for cells where that rule is true.
Data validation
Choose Data > Data Validation to control what people type. In Allow, pick Whole Number, Decimal, List, Date, Time, Text Length or Custom (a formula). For a drop-down list, choose List and type the items separated by commas in Source, such as Low,Average,High. Use between to set a minimum and a maximum. The Input Message tab shows a tip when the cell is selected.
| Error Alert style | What happens to an invalid entry |
|---|---|
| Stop | It is refused; the user can only retry or cancel |
| Warning | The user is warned and can choose to keep it |
| Information | The user is told and can keep it |
Validation checks only what people type. Pasted or filled data can get past it, and Excel does not check data that was there before the rule. Use Data Validation > Circle Invalid Data to find those cells. To remove a rule, choose Clear All in the Data Validation box.
Duplicates
First highlight duplicates (Highlight Cells Rules > Duplicate Values) so you can review them. Data > Remove Duplicates then deletes repeated rows permanently, so copy the original data to another sheet first, and remove any outlines or subtotals. In the dialog box, check only the columns that must match: a row is removed when all checked columns match another row.
The UNIQUE function makes a list without changing the data: =UNIQUE(B2:B8) lists each value once, and =UNIQUE(B2:B8,FALSE,TRUE) lists only values that appear exactly once. Its result spills into the cells below.
Practical exercise: clean up a sign-in list
Copy this visitor sign-in list into Excel, then copy it to a second sheet so you keep the original.
| A | B | C | |
|---|---|---|---|
| 1 | Name | Shift | |
| 2 | Ana Diaz | ana@example.com | Day |
| 3 | Ben Cole | ben@example.com | Night |
| 4 | Ana Diaz | ana@example.com | Day |
| 5 | Chen Wu | chen@example.com | Day |
| 6 | Ben Cole | ben@example.com | Day |
| 7 | Dina Roy | dina@example.com | Night |
| 8 | Chen Wu | chen@example.com | Day |
Highlight repeated email addresses in B2:B8. How many cells are highlighted?
Toon antwoord
Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values. 6 cells are highlighted (ana, ben and chen each appear twice). Only dina@example.com is not.
On the copy, select A1:C8 and use Data > Remove Duplicates with all columns checked. How many data rows are left?
Toon antwoord
5. Two rows were exact repeats. Ben Cole stays twice because his shifts differ (Night and Day).
Add a drop-down list to C2:C20 that only allows Day or Night.
Toon antwoord
Select C2:C20, choose Data > Data Validation, set Allow to List and type Day,Night in Source. On the Error Alert tab, choose the Stop style so other typed values are refused.
Themaquiz 5: Conditional formatting, data validation and duplicates
Lesson 6: PivotTables and charts for analysis
A PivotTable summarizes a long list in seconds, for example total sales by rep, or by region and product. Get the data ready first: columns with a single header row, no blank rows or columns, and ideally an Excel table so new rows are included. Select a cell in the data and choose Insert > PivotTable.
| Area in the Field List | How the field appears |
|---|---|
| Rows | As row labels down the left side |
| Columns | As column labels across the top |
| Values | As summarized numbers in the body |
| Filters | As a report filter above the PivotTable |
When you tick a field, text fields usually go to Rows and numeric fields to Values; drag fields between areas to change the layout. Number fields in Values are shown as a Sum. If a field has text or blank cells, Excel uses Count instead; right-click a value and choose Summarize Values By to change it (for example to Sum, Average, Max or Min).
Right-click a value and choose Show Values As to show % of Grand Total, % of Column Total, % of Row Total, a Running Total, a Difference From another item, or a rank. With the Lesson 2 sales log, Region in Rows and Amount as % of Grand Total, North shows 43.9% (3,310 of 7,540).
A PivotTable does not always update by itself when you change the source data. Right-click it and choose Refresh (or press Alt+F5), or use Refresh All for every PivotTable. Slicers (Insert > Slicer) are buttons that filter a PivotTable or table; hold Ctrl to pick several items, and choose Clear Filter to show everything. Insert > PivotChart makes a chart from the same summary.
Charts for analysis
| Question | Chart to try |
|---|---|
| Do two numbers move together (for example, training hours and customer scores)? | Scatter (XY): each pair of values is one point |
| How are values spread out? | Histogram: values grouped into bins |
| How do two series with very different sizes compare (revenue and order count)? | Combo chart with one series on a secondary axis |
| What is the trend in each row of a table? | Sparklines: tiny Line, Column or Win/Loss charts inside cells |
| Where is the trend heading? | Add a trendline (the + button next to the chart > Trendline); set Forward in Format Trendline to project it |
Practical exercise: summarize the sales log with a PivotTable
Use the sales log from Lesson 2 (A1:F11). Select any cell in it and choose Insert > PivotTable, New Worksheet.
Put Rep in Rows and Amount in Values. What totals do you see?
Toon antwoord
Ana 2,610, Ben 2,950, Chloé 1,280, Dev 700, Grand Total 7,540. Amount is numeric, so Excel uses Sum.
Drag Region to the Filters area and choose North. Which reps are left, and what is the total?
Toon antwoord
Ana 2,610, Dev 700. Total 3,310. Clear the filter before the next task.
Drag Product to Columns. What is shown for Ana under Cameras?
Toon antwoord
2,100 (1,200 + 900).
Remove Product from Columns. Right-click a value and choose Show Values As > % of Grand Total. What share does Ben have?
Toon antwoord
About 39.1% (2,950 / 7,540).
Bronnen
- Microsoft Support: IF function
- Microsoft Support: IFS function
- Microsoft Support: AND function
- Microsoft Support: OR function
- Microsoft Support: Using IF with AND, OR and NOT functions
- Microsoft Support: SUMIFS function
- Microsoft Support: SUMIF function
- Microsoft Support: COUNTIFS function
- Microsoft Support: AVERAGEIFS function
- Microsoft Support: XLOOKUP function
- Microsoft Support: VLOOKUP function
- Microsoft Support: INDEX function
- Microsoft Support: MATCH function
- Microsoft Support: Look up values with VLOOKUP, INDEX, or MATCH
- Microsoft Support: IFERROR function
- Microsoft Support: IFNA function
- Microsoft Support: LEFT function
- Microsoft Support: RIGHT function
- Microsoft Support: MID, MIDB functions
- Microsoft Support: LEN function
- Microsoft Support: TRIM function
- Microsoft Support: PROPER function
- Microsoft Support: UPPER function
- Microsoft Support: CONCAT function
- Microsoft Support: TEXTJOIN function
- Microsoft Support: SEARCH function
- Microsoft Support: SUBSTITUTE function
- Microsoft Support: TEXT function
- Microsoft Support: DATE function
- Microsoft Support: TODAY function
- Microsoft Support: MONTH function
- Microsoft Support: WEEKDAY function
- Microsoft Support: NETWORKDAYS function
- Microsoft Support: EOMONTH function
- Microsoft Support: EDATE function
- Microsoft Support: DATEDIF function
- Microsoft Support: Create a PivotTable to analyze worksheet data
- Microsoft Support: Use the Field List to arrange fields in a PivotTable
- Microsoft Support: Refresh PivotTable data
- Microsoft Support: Show different calculations in PivotTable value fields
- Microsoft Support: Sum values in a PivotTable
- Microsoft Support: Use slicers to filter data
- Microsoft Support: Filter data in a PivotTable
- Microsoft Support: Create a PivotChart
- Microsoft Support: Highlight patterns and trends with conditional formatting
- Microsoft Support: Manage conditional formatting rule precedence
- Microsoft Support: Conditional formatting rules that use a formula
- Microsoft Support: Apply data validation to cells
- Microsoft Support: More on data validation
- Microsoft Support: Find and remove duplicates
- Microsoft Support: UNIQUE function
- Microsoft Support: Use sparklines to show data trends
- Microsoft Support: Add or remove a secondary axis in a chart in Excel
- Microsoft Support: Add a trend or moving average line to a chart
- Microsoft Support: Available chart types in Office