Preparing your learning space...
81% through AI + Excel Projects tutorials
A school database links students, classes, and teachers in related tables and answers questions with lookups. You build it in Excel and use Copilot and ChatGPT for the schema design and lookup formulas.
school-database.xlsx │ ├── Sheet: Students (StudentID, Name, ClassID) ├── Sheet: Classes (ClassID, ClassName, TeacherID) ├── Sheet: Teachers (TeacherID, TeacherName) └── Module: SchMacros (optional VBA)
Three related tables sharing ClassID and TeacherID.
Relations let one teacher serve many classes without repeating names.
Create each as a table (Stu, Cls, Tch).
No formula; design the columns first.
Ask ChatGPT:
"Design three related Excel tables for a school: students, classes, teachers, with the keys that link them."
Formulas that return a student's class name and teacher name.
One ID should reveal the full path.
=XLOOKUP(XLOOKUP(B1, Stu[StudentID], Stu[ClassID]), Cls[ClassID], Cls[ClassName]) =XLOOKUP(XLOOKUP(B1, Stu[StudentID], Stu[ClassID]), Cls[ClassID], Cls[TeacherID])
Ask Copilot:
"Write a nested XLOOKUP: from StudentID get ClassID, then from ClassID get ClassName."
A count of students per class.
Shows how full each class is.
=COUNTIF(Stu[ClassID], A2)
Ask ChatGPT:
"Write COUNTIF that counts students where ClassID equals A2."
=XLOOKUP(XLOOKUP(B1, Stu[StudentID], Stu[ClassID]), Cls[ClassID], Cls[ClassName]) =XLOOKUP(XLOOKUP(B1, Stu[StudentID], Stu[ClassID]), Cls[ClassID], Cls[TeacherID]) =COUNTIF(Stu[ClassID], A2)
ChatGPT: "Design students, classes, teachers tables with keys." Copilot: "Nested XLOOKUP StudentID to ClassID to ClassName." ChatGPT: "COUNTIF students where ClassID equals A2."
school-database.xlsx.Input: Student S003 in Class C2; C2 taught by T1. Expected Output: ClassName for C2 and TeacherName for T1. Explanation: Nested XLOOKUP chains the keys.
Input: Class C2 has 25 students. Expected Output: Size 25. Explanation: COUNTIF tallies the class.
Input: Student ID not in list. Expected Output: #N/A (or "Not found" if wrapped). Explanation: XLOOKUP finds no match.
Problem: Lookup fails. Reason: ClassID types differ (text vs number). Solution: Make both ID columns the same format.
Problem: Teacher mismatch. Reason: TeacherID typo in Classes. Solution: Fix the Classes table key.
Problem: Fewer students than real. Reason: Blank ClassID cells. Solution: Ensure every student has a ClassID.
Save your progress and earn XP for completing tutorials.
4 questions · Pass with 70%+
1Student's class found via?
2=COUNTIF(Stu[ClassID], A2) gives?
3Why must ID types match?
4ChatGPT can?
Technology
Excel with AI
Lesson group
AI + Excel Projects
Progress
81% complete