Preparing your learning space...
69% through AI + Excel Projects tutorials
A hospital management sheet tracks patients, admissions, bed occupancy, and billing in one workbook. You build it in Excel and use Copilot and ChatGPT for the lookup and billing formulas.
hospital-management.xlsx │ ├── Sheet: Patients (PatientID, Name, Doctor, Admit, Discharge) ├── Sheet: Billing (PatientID, Amount) ├── Sheet: Beds (BedID, Status) └── Module: HospMacros (optional VBA)
A Pat table and a search that returns a patient's doctor and status.
Staff need instant record access.
=XLOOKUP(B1, Pat[PatientID], Pat[Doctor], "Not found") =XLOOKUP(B1, Pat[PatientID], Pat[Name], "Not found")
"Not found" argument handles missing IDs.Ask ChatGPT:
"Write an XLOOKUP that returns a patient's doctor from PatientID, showing Not found if missing."
A count of patients per doctor.
Helps balance assignments.
=COUNTIF(Pat[Doctor], A2)
Ask Copilot:
"Write COUNTIF that counts patients where Doctor equals A2."
A percentage of occupied beds.
Shows capacity at a glance.
=IFERROR(COUNTIF(Beds[Status], "Occupied")/COUNTA(Beds[BedID]), 0)
Ask ChatGPT:
"Write bed occupancy as occupied beds divided by total beds, with error handling."
A total billed per patient and an AI discharge prompt.
Finance needs totals; doctors need notes.
=SUMIF(Billing[PatientID], B1, Billing[Amount])
Paste a patient's record into ChatGPT:
"Write a one-paragraph discharge summary from this admission record."
=XLOOKUP(B1, Pat[PatientID], Pat[Doctor], "Not found") =COUNTIF(Pat[Doctor], A2) =IFERROR(COUNTIF(Beds[Status], "Occupied")/COUNTA(Beds[BedID]), 0) =SUMIF(Billing[PatientID], B1, Billing[Amount])
ChatGPT: "XLOOKUP doctor from PatientID, Not found if missing." Copilot: "COUNTIF patients where Doctor equals A2." ChatGPT: "Bed occupancy occupied/total with error handling." ChatGPT: "Discharge summary from this admission record."
hospital-management.xlsx.Input: Patient P005 assigned to Dr. Lee. Expected Output: Lookup shows "Dr. Lee". Explanation: XLOOKUP matches the ID.
Input: 20 beds, 15 occupied. Expected Output: Occupancy 75%. Explanation: 15/20.
Input: P005 billed 100 and 50. Expected Output: Total 150. Explanation: SUMIF adds both charges.
Problem: ID not found though it exists. Reason: Extra spaces in the ID. Solution: Trim the search cell.
Problem: #DIV/0!. Reason: No beds listed. Solution: IFERROR handles it as shown.
Problem: Total too high. Reason: PatientID duplicated in Billing. Solution: Keep one row per charge; SUMIF sums all matches.
Save your progress and earn XP for completing tutorials.
4 questions · Pass with 70%+
1Find doctor from PatientID?
2=COUNTIF(Pat[Doctor], A2) gives?
3Bed occupancy = ?
4ChatGPT can?
Technology
Excel with AI
Lesson group
AI + Excel Projects
Progress
69% complete