How to put the right student ID on every report card row with a few spreadsheet formulas, and turn red anything a person needs to check. Every name and ID on this page is made up.
Download the PDF guideGrade and comment exports often have student names but no student ID. Most report card and student data systems match each row to a student by ID, so every row needs one.
Lining two alphabetical lists up side by side works until one row is off. Then every ID below it lands on the wrong student, and nothing looks wrong.
With two students named Isaiah Brooks, a simple lookup grabs the first one and never warns you. The sheet is built so that can't happen silently.
Set up a sheet with two tabs. IDs is a list you trust that already has student IDs, such as a dismissal or enrollment roster. Grades is the export that needs IDs, one row per student per class. The formulas go in the blue-header columns.
The key is last name, first name and grade joined into one piece of text, with extra spaces removed and everything in lowercase. The same recipe runs on both tabs, so the same student produces the same key on each.
Why: a spreadsheet compares text exactly, so " chen " and "Chen" look like different people. The key throws away what doesn't matter (spacing, capitals) and keeps what does. Grade is in the key so two students with the same name in different grades stay apart.
For each report card row, count how many students on the IDs tab have the same key.
Why: the count tells you whether the answer is safe. 1 means exactly one student, a clean match. 0 means no one on the ID list matches. 2 or more means two students share that name and grade, so the sheet can't know which one is meant.
Why: a lookup on its own returns the first match it finds, even when there are two. Checking the count first means an ID only appears when it's certain. Anything else says CHECK, so a wrong ID never slips in quietly.
Select the Grades rows and add a conditional formatting rule that uses a formula. In Google Sheets: Format, then Conditional formatting, then "Custom formula is." In Excel: Home, then Conditional Formatting, then New Rule, then "Use a formula." Enter the rule below and set the fill to red. A second rule, =$H2=1, colors the clean rows green.
Why: with hundreds of students and several classes each, nobody can read every row. Green rows are done. You only look at the red ones.
On the IDs tab, a count of each student's rows on the Grades tab catches a student who has no report card data at all, for example a student who isn't in a report card batch yet.
This is a small Grades tab, working live. Edit any name or grade, or use a button to fix one of the red rows, and watch the row turn green.
| ALast Name | BFirst Name | CGrade | DClass | FMatch Key | GStudent ID | HMatches | IStatus |
|---|
| ALast Name | BFirst Name | CStudent ID | DGrade | EMatch Key | FRows on Grades | GStatus |
|---|
The two Isaiah Brooks rows stay red on purpose. Same name, same grade: only a person can tell which report card belongs to which student, using class or homeroom.
The comments export gets the same treatment: paste it into another Grades-style tab and reuse the same key and formulas.