How to Track Passport Expiration Dates in Google Sheets: Check Every Trip Against the 6-Month Rule and Get Renewal Reminders (2026)
The date printed in a passport is not the date that catches people out. The U.S. State Department’s passport FAQ says some destinations require a passport to be valid at least 6 months beyond the dates of your trip, and that some airlines won’t let you board if it isn’t. So a passport that expires in five months can already be too short for a trip next week, and you only find out when you check it against the trip. This guide builds a passport tracker in Google Sheets for a family (or a small team that travels): one row per passport with a renew-by date worked out from its expiry, a Trips tab that checks every planned trip against the validity rule you enter for it, one list of what to renew, and a free Apps Script that emails you while there is still time. The script runs in preview mode first, so nothing goes out until you have read it.
If you are tracking staff licenses, permits or certifications, the license and certification tracker fits better, and for car paperwork there is the vehicle registration and inspection guide. For the simplest possible “email me before this date” setup, see email reminders from a date column.
Step 1: a Passports tab with one row per document
Name a tab Passports and type these headers in row 1. H to J are formulas (Step 2) and K is for the script. Someone with two nationalities, or a passport book and a passport card, gets one row per document.
| Col | Header | What goes in it |
|---|---|---|
| A | Traveler | The person’s name, written the same way on every row and on the Trips tab |
| B | Document | “US passport”, “US passport card”, “Irish passport”… The Trips tab looks a document up by Traveler and Document, so keep the names consistent. |
| C | Last 4 | The last 4 characters of the document number, enough to tell an old and a new passport apart. Use Format › Number › Plain text so a leading zero stays. |
| D | Expires | The expiration date from the data page (Format › Number › Date) |
| E | Lead (months) | How many months before expiry you want to start renewing. The example uses 9: room for a 6-month rule plus time to get the new passport. Blank means the renew-by date is the expiry date. |
| F | Who should hear about it. For a child, a parent’s email. | |
| G | Renewal | A Data › Data validation dropdown with one option, Applied. Set it when the renewal is sent off; renewal reminders stop, trips are still checked. |
| H, I, J | Days left, Renew by, Status | Formulas (Step 2) |
| K | Sent log | Left empty for the script |
Step 2: days left, renew-by date and status
Put these in H2, I2 and J2 and fill them down. Days left is negative once the passport has expired:
=IF(OR(A2="", D2=""), "", D2-TODAY())
Renew by goes back the lead months from the expiry date with EDATE (format column I as a date). N() turns a blank lead into 0. EDATE keeps the day of the month, and when that day doesn’t exist it uses the month’s last day, so 9 months before January 31 is April 30:
=IF(D2="", "", EDATE(D2, -N(E2)))
Status is Applied once the renewal is under way, Expired after the expiry date, Renew now once the renew-by date has arrived, Renew soon in the 30 days before it, and otherwise OK:
=IF(H2="", "", IF(G2="Applied", "Applied", IF(H2<0, "Expired", IF(I2<=TODAY(), "Renew now", IF(I2<=TODAY()+30, "Renew soon", "OK")))))
On November 23, 2026, the example family’s Passports tab reads:
| A Traveler | B Document | C Last 4 | D Expires | E Lead (months) | F | G Renewal | H Days left | I Renew by | J Status |
|---|---|---|---|---|---|---|---|---|---|
| Maya Ortiz | US passport | 4821 | Mar 14, 2027 | 9 | maya@example.com | 111 | Jun 14, 2026 | Renew now | |
| Maya Ortiz | US passport card | 6610 | Nov 10, 2026 | maya@example.com | -13 | Nov 10, 2026 | Expired | ||
| Leo Ortiz | US passport | 1193 | Sep 20, 2027 | 9 | maya@example.com | 301 | Dec 20, 2026 | Renew soon | |
| Daniel Ortiz | US passport | 7730 | May 9, 2031 | 9 | dan@example.com | 1628 | Aug 9, 2030 | OK | |
| Daniel Ortiz | Irish passport | 3458 | Jan 31, 2027 | 9 | dan@example.com | Applied | 69 | Apr 30, 2026 | Applied |
| Ana Ruiz | US passport | 2210 | Feb 15, 2028 | 9 | ana@example.com | 449 | May 15, 2027 | OK |
Example data: the people and numbers are made up. Days left and Status change every day because they use TODAY(). Sent log (K) is left out.
Maya’s passport still has 111 days on it, which sounds like plenty, but with a 9-month lead its renew-by date was in June, so it says Renew now. Her passport card has already expired. Leo’s passport is fine for almost another year, yet its renew-by date is 27 days away. Daniel has already sent his Irish passport off for renewal, so it says Applied, and his and Ana’s US passports are OK.
Step 3: check every trip against the validity rule
Make a second tab named Trips with one row per traveler per trip, so a family of three on one holiday is three rows. A to F are typed, G to J are formulas, K is for the script.
| Col | Header | What goes in it |
|---|---|---|
| A | Traveler | A dropdown with Data › Data validation › Dropdown (from a range) and the range Passports!A2:A |
| B | Trip | A name for the trip |
| C, D | Depart, Return | The day you leave and the day you leave the destination to come home |
| E | Months after return | How many months of validity the destination asks for after you leave it: 6, 3, or 0 for “valid for the whole stay”. Look it up for each trip on the destination’s page at travel.state.gov or the country’s embassy site; don’t reuse a number from another trip. |
| F | Document | Which document the traveler will use, exactly as on the Passports tab |
| G to J | Expires, Needed until, Check, Margin (days) | Formulas, below |
| K | Sent log | Left empty for the script |
Expires (G2) finds the document’s expiry date with FILTER on both the traveler and the document, and says Not found if there is no such row (format G as a date):
=IF(A2="", "", IFERROR(INDEX(FILTER(Passports!$D$2:$D, Passports!$A$2:$A=A2, Passports!$B$2:$B=F2), 1), "Not found"))
Needed until (H2) is the return date plus the months the destination asks for. With 0 months it is the return date itself:
=IF(OR(A2="", D2=""), "", EDATE(D2, N(E2)))
Check (I2) is Past once the trip is over, No document if the lookup failed, Renew before trip if the document runs out before the date it is needed until, and otherwise OK:
=IF(A2="", "", IF(D2<TODAY(), "Past", IF(G2="Not found", "No document", IF(G2<H2, "Renew before trip", "OK"))))
Margin (days) (J2) is how many days the document has to spare, negative when it is short:
=IF(AND(ISNUMBER(G2), I2<>"Past"), G2-H2, "")
| A Traveler | B Trip | C Depart | D Return | E Months after return | F Document | G Expires | H Needed until | I Check | J Margin (days) |
|---|---|---|---|---|---|---|---|---|---|
| Maya Ortiz | Fall visit | Oct 2, 2026 | Oct 9, 2026 | 6 | US passport | Mar 14, 2027 | Apr 9, 2027 | Past | |
| Daniel Ortiz | Work trip | Dec 8, 2026 | Dec 12, 2026 | 3 | Irish passport | Jan 31, 2027 | Mar 12, 2027 | Renew before trip | -40 |
| Maya Ortiz | Spring break | Mar 20, 2027 | Mar 27, 2027 | 6 | US passport | Mar 14, 2027 | Sep 27, 2027 | Renew before trip | -197 |
| Leo Ortiz | Spring break | Mar 20, 2027 | Mar 27, 2027 | 6 | US passport | Sep 20, 2027 | Sep 27, 2027 | Renew before trip | -7 |
| Daniel Ortiz | Spring break | Mar 20, 2027 | Mar 27, 2027 | 6 | US passport | May 9, 2031 | Sep 27, 2027 | OK | 1320 |
| Ana Ruiz | Summer visit | Jul 1, 2027 | Jul 21, 2027 | 0 | US passport | Feb 15, 2028 | Jul 21, 2027 | OK | 209 |
| Leo Ortiz | Summer visit | Jul 1, 2027 | Jul 21, 2027 | 0 | US passport card | Not found | Jul 21, 2027 | No document |
The Trips tab on November 23, 2026. The months in column E are example values typed for each trip, not the rules of any particular country.
This is where the tracker earns its keep. Maya’s passport fails the spring break check by 197 days, so it has to be renewed before March, not “some time next year”. Leo’s passport is valid until September 20, but a 6-month rule after a March 27 return needs September 27, so it is 7 days short even though it has almost a year left. Daniel’s Irish passport is already being renewed, but the old one is still the one on file, so his December work trip stays flagged until the new expiry date is typed in. Leo’s summer visit names a passport card he doesn’t have, so it says No document.
Step 4: one list of what to do
On a third tab (call it Summary), this lists every document that is expired or due for renewal, the earliest renew-by date first, using SORT and FILTER:
=SORT(FILTER({Passports!A2:A, Passports!B2:B, Passports!D2:D, Passports!I2:I, Passports!J2:J}, REGEXMATCH(Passports!J2:J, "^(Expired|Renew now|Renew soon)$")), 4, TRUE)
| A Traveler | B Document | C Expires | D Renew by | E Status |
|---|---|---|---|---|
| Maya Ortiz | US passport | Mar 14, 2027 | Jun 14, 2026 | Renew now |
| Maya Ortiz | US passport card | Nov 10, 2026 | Nov 10, 2026 | Expired |
| Leo Ortiz | US passport | Sep 20, 2027 | Dec 20, 2026 | Renew soon |
Further down the same tab, this lists every trip at risk by departure date (ties sorted by traveler):
=SORT(FILTER({Trips!A2:A, Trips!B2:B, Trips!C2:C, Trips!F2:F, Trips!G2:G, Trips!H2:H, Trips!I2:I}, REGEXMATCH(Trips!I2:I, "^(Renew before trip|No document)$")), 3, TRUE, 1, TRUE)
| A Traveler | B Trip | C Depart | D Document | E Expires | F Needed until | G Check |
|---|---|---|---|---|---|---|
| Daniel Ortiz | Work trip | Dec 8, 2026 | Irish passport | Jan 31, 2027 | Mar 12, 2027 | Renew before trip |
| Leo Ortiz | Spring break | Mar 20, 2027 | US passport | Sep 20, 2027 | Sep 27, 2027 | Renew before trip |
| Maya Ortiz | Spring break | Mar 20, 2027 | US passport | Mar 14, 2027 | Sep 27, 2027 | Renew before trip |
| Leo Ortiz | Summer visit | Jul 1, 2027 | US passport card | Not found | Jul 21, 2027 | No document |
Both lists on November 23, 2026.
For a per-person view, make a fourth tab named Travelers, put the list of travelers in A2 and the three formulas next to it in B2, C2 and D2, filled down. To renew and Trips at risk use COUNTIFS, and Next trip uses MINIFS with LET, because MINIFS returns 0 when there is no match (format D as a date):
=SORT(UNIQUE(FILTER(Passports!A2:A, Passports!A2:A<>"")))
=COUNTIFS(Passports!$A$2:$A, A2, Passports!$J$2:$J, "<>OK", Passports!$J$2:$J, "<>Applied")
=COUNTIFS(Trips!$A$2:$A, A2, Trips!$I$2:$I, "<>OK", Trips!$I$2:$I, "<>Past")
=LET(d, MINIFS(Trips!$C$2:$C, Trips!$A$2:$A, A2, Trips!$C$2:$C, ">="&TODAY()), IF(d=0, "", d))
| A Traveler | B To renew | C Trips at risk | D Next trip |
|---|---|---|---|
| Ana Ruiz | 0 | 0 | Jul 1, 2027 |
| Daniel Ortiz | 0 | 1 | Dec 8, 2026 |
| Leo Ortiz | 1 | 2 | Mar 20, 2027 |
| Maya Ortiz | 2 | 1 | Mar 20, 2027 |
The Travelers tab for the example on November 23, 2026.
Then select A2:K on the Passports tab, open Format › Conditional formatting, choose Custom formula is and add the first four rules; select A2:K on the Trips tab and add the last two. None of them overlap, so their order doesn’t matter:
| Tab | Custom formula | Color | Meaning |
|---|---|---|---|
| Passports | =$J2="Expired" | Red | Expired |
| Passports | =$J2="Renew now" | Orange | Past the renew-by date |
| Passports | =$J2="Renew soon" | Yellow | Renew-by date within 30 days |
| Passports | =$J2="Applied" | Grey text | Renewal sent off |
| Trips | =OR($I2="Renew before trip", $I2="No document") | Red | The document won’t be valid long enough, or isn’t on file |
| Trips | =$I2="Past" | Grey text | The trip is over |
Step 5: email reminders while there is time to renew
Colors only help when someone opens the sheet. Open Extensions › Apps Script, paste the script below and save. Then:
- Reload the spreadsheet. A Passports menu appears (it is created by the script’s
onOpen, as described in Google’s custom menus page). - Run
sendPassportRemindersonce from the editor and approve the permissions.PREVIEWis true, so every email comes to you, with the real recipient in the subject, and nothing is written to the sheet. - Read the previews. When they look right, set
PREVIEW = falseand save. - Add the trigger: Triggers › Add trigger › sendPassportReminders › Time-driven › Day timer, for example 7 to 8 AM. See Google’s installable triggers page for the details.
/**
* Passport renewal and trip-validity reminders, plus a "renewal applied" menu.
*
* Tab "Passports" (row 1 = headers, any order, extra columns are fine):
* Required: Traveler, Document, Expires, Email, Sent log
* Optional: Lead (months), Renewal
* Tab "Trips" (optional): Traveler, Trip, Depart, Return, Months after return, Document, Sent log
*
* Every run sends each email address at most one message listing:
* - documents whose renew-by date (Expires minus Lead months) is within SOON_DAYS: once
* - documents past their renew-by date: then, and every NOW_EVERY days until they expire
* - documents that have expired: once
* - upcoming trips where the document runs out before Return + Months after return,
* or where no matching document is found: then, and every TRIP_EVERY days until it is fixed
* Documents whose Renewal is Applied get no renewal reminders, but their trips are still checked.
* Run it with PREVIEW = true first: every email comes to you and nothing is logged.
*/
const PASSPORTS = 'Passports';
const TRIPS = 'Trips';
const SOON_DAYS = 30; // heads-up this many days before the renew-by date
const NOW_EVERY = 30; // days between "renew now" emails
const TRIP_EVERY = 14; // days between emails about a trip at risk
const PREVIEW = true; // true: everything goes to you, nothing is logged
const LOG_KEEP = 20; // entries kept in each Sent log cell
const APPLIED = /^applied$/i;
const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
function onOpen() {
SpreadsheetApp.getUi().createMenu('Passports')
.addItem('Mark selected renewal applied', 'markRenewalApplied')
.addItem('Send reminders now', 'sendPassportReminders')
.addToUi();
}
function sendPassportReminders(now) {
const lock = LockService.getDocumentLock();
if (!lock.tryLock(30000)) return; // another run is still going
try {
// A time-driven trigger passes an event object, so only use a real Date.
return remind_(now instanceof Date ? new Date(now) : new Date());
} finally {
lock.releaseLock();
}
}
function headers_(values) {
const head = values[0].map((h) => String(h).trim().toLowerCase());
return (n) => head.indexOf(n.toLowerCase());
}
function remind_(now) {
const ss = SpreadsheetApp.getActive();
const tz = ss.getSpreadsheetTimeZone();
const sh = ss.getSheetByName(PASSPORTS);
if (!sh) throw new Error('No tab named "' + PASSPORTS + '".');
const data = sh.getDataRange().getValues();
const col = headers_(data);
const missing = ['Traveler', 'Document', 'Expires', 'Email', 'Sent log'].filter((n) => col(n) < 0);
if (missing.length) throw new Error('Missing column(s) on ' + PASSPORTS + ': ' + missing.join(', '));
const C = { who: col('Traveler'), doc: col('Document'), exp: col('Expires'), lead: col('Lead (months)'),
email: col('Email'), ren: col('Renewal'), log: col('Sent log') };
const me = Session.getEffectiveUser().getEmail();
// Dates as day numbers in the spreadsheet's time zone, and EDATE-style month steps.
const parts = (d) => Utilities.formatDate(d, tz, 'yyyy-MM-dd').split('-').map(Number);
const day = (d) => { const p = parts(d); return Date.UTC(p[0], p[1] - 1, p[2]) / 864e5; };
const edate = (d, months) => {
const p = parts(d), t = p[1] - 1 + months, y = p[0] + Math.floor(t / 12), m = ((t % 12) + 12) % 12;
const last = new Date(Date.UTC(y, m + 1, 0)).getUTCDate();
return Date.UTC(y, m, Math.min(p[2], last)) / 864e5;
};
const show = (n) => { const d = new Date(n * 864e5); return MONTHS[d.getUTCMonth()] + ' ' + d.getUTCDate() + ', ' + d.getUTCFullYear(); };
const iso = (n) => new Date(n * 864e5).toISOString().slice(0, 10);
const key = (who, doc) => String(who).trim().toLowerCase() + '|' + String(doc).trim().toLowerCase();
const today = day(now);
const people = {}, problems = [], docs = {}, travelers = {};
const person = (to) => (people[to] = people[to] || { docs: [], trips: [] });
for (let r = 1; r < data.length; r++) {
const row = data[r];
const who = String(row[C.who]).trim(), doc = String(row[C.doc]).trim();
if (!who) continue;
const email = String(row[C.email]).trim() || me;
if (!travelers[who.toLowerCase()]) travelers[who.toLowerCase()] = email;
const exp = row[C.exp];
if (!(exp instanceof Date)) { problems.push(PASSPORTS + ' ' + (r + 1) + ' (Expires is not a date)'); continue; }
const rawLead = C.lead >= 0 ? String(row[C.lead]).trim() : '';
const lead = rawLead === '' ? 0 : Number(rawLead);
if (!(lead >= 0) || lead % 1) { problems.push(PASSPORTS + ' ' + (r + 1) + ' (Lead (months) should be a whole number)'); continue; }
const expires = day(exp), renewBy = edate(exp, -lead);
const applied = C.ren >= 0 && APPLIED.test(String(row[C.ren]).trim());
if (!docs[key(who, doc)]) docs[key(who, doc)] = { expires: expires, email: email, applied: applied };
if (applied) continue;
const left = expires - today, untilRenew = renewBy - today;
let tag = '', note = '';
if (left < 0) { tag = 'expired'; note = 'EXPIRED on ' + show(expires); }
else if (untilRenew <= 0) { tag = 'now' + Math.floor(-untilRenew / NOW_EVERY);
note = 'start the renewal now (renew-by date was ' + show(renewBy) + '), expires ' + show(expires) + ', ' + left + ' day' + (left === 1 ? '' : 's') + ' left'; }
else if (untilRenew <= SOON_DAYS) { tag = 'soon';
note = 'renew by ' + show(renewBy) + ' (in ' + untilRenew + ' day' + (untilRenew === 1 ? '' : 's') + '), expires ' + show(expires); }
const log = String(row[C.log]).split(';').map((s) => s.trim()).filter(String);
const entry = iso(expires) + ' ' + tag;
if (!tag || log.indexOf(entry) >= 0) continue;
person(email).docs.push({ sheet: sh, r: r, col: C.log, log: log, entry: entry, order: untilRenew,
text: who + ', ' + doc + ': ' + note });
}
const ts = ss.getSheetByName(TRIPS);
if (ts) {
const t = ts.getDataRange().getValues(), tc = headers_(t);
const T = { who: tc('Traveler'), trip: tc('Trip'), dep: tc('Depart'), ret: tc('Return'),
months: tc('Months after return'), doc: tc('Document'), log: tc('Sent log') };
const tmiss = ['Traveler', 'Trip', 'Depart', 'Return', 'Months after return', 'Document', 'Sent log'].filter((n) => tc(n) < 0);
if (tmiss.length) problems.push('Trips tab skipped, missing column(s): ' + tmiss.join(', '));
for (let r = 1; r < t.length && !tmiss.length; r++) {
const row = t[r];
const who = String(row[T.who]).trim();
if (!who) continue;
if (!(row[T.dep] instanceof Date) || !(row[T.ret] instanceof Date)) { problems.push(TRIPS + ' ' + (r + 1) + ' (Depart and Return must be dates)'); continue; }
const rawM = String(row[T.months]).trim(), months = rawM === '' ? 0 : Number(rawM);
if (!(months >= 0) || months % 1) { problems.push(TRIPS + ' ' + (r + 1) + ' (Months after return should be a whole number)'); continue; }
const depart = day(row[T.dep]), ret = day(row[T.ret]);
if (ret < today) continue; // trip is over
const needed = edate(row[T.ret], months);
const doc = String(row[T.doc]).trim(), d = docs[key(who, doc)];
if (d && d.expires >= needed) continue; // fine
const toDepart = depart - today;
const email = d ? d.email : (travelers[who.toLowerCase()] || me);
const trip = String(row[T.trip]).trim() || 'Trip';
const when = toDepart > 0 ? 'departs ' + show(depart) + ' (in ' + toDepart + ' day' + (toDepart === 1 ? '' : 's') + ')' : 'under way, returns ' + show(ret);
const text = d
? who + ', ' + trip + ' ' + when + ': ' + doc + ' expires ' + show(d.expires) + ' but must be valid until ' + show(needed) +
' (' + (needed - d.expires) + ' day' + (needed - d.expires === 1 ? '' : 's') + ' short)' + (d.applied ? '. Renewal applied: update Expires when the new one arrives.' : '')
: who + ', ' + trip + ' ' + when + ': no "' + doc + '" for ' + who + ' on the ' + PASSPORTS + ' tab';
const log = String(row[T.log]).split(';').map((s) => s.trim()).filter(String);
const entry = iso(depart) + ' ' + (d ? iso(d.expires) : 'none') + ' w' + Math.floor(Math.max(toDepart, 0) / TRIP_EVERY);
if (log.indexOf(entry) >= 0) continue;
person(email).trips.push({ sheet: ts, r: r, col: T.log, log: log, entry: entry, order: depart, text: text });
}
}
let sent = 0, items = 0, stopped = '';
for (const to of Object.keys(people)) {
const p = people[to];
p.docs.sort((a, b) => a.order - b.order); p.trips.sort((a, b) => a.order - b.order);
const recipients = PREVIEW ? 1 : to.split(',').length;
if (MailApp.getRemainingDailyQuota() < recipients) { stopped = 'quota'; break; }
const all = p.docs.concat(p.trips);
const out = [];
if (p.docs.length) out.push('Documents to renew:\n' + p.docs.map((x) => '- ' + x.text).join('\n'));
if (p.trips.length) out.push('Trips at risk:\n' + p.trips.map((x) => '- ' + x.text).join('\n'));
const subject = 'Passports: ' + all.length + ' item' + (all.length === 1 ? '' : 's') + ' to check' + (p.trips.length ? ' (' + p.trips.length + ' trip' + (p.trips.length === 1 ? '' : 's') + ' at risk)' : '');
MailApp.sendEmail({
to: PREVIEW ? me : to,
subject: (PREVIEW ? '[PREVIEW to ' + to + '] ' : '') + subject,
body: out.join('\n\n') + '\n\nApplied for a renewal? Set Renewal to Applied (or Passports > Mark selected renewal applied). When the new passport arrives, type its expiry date and clear Renewal.\n'
});
sent++; items += all.length;
if (!PREVIEW) all.forEach((x) => x.sheet.getRange(x.r + 1, x.col + 1).setValue(x.log.concat([x.entry]).slice(-LOG_KEEP).join('; ')));
}
if (problems.length || stopped) console.log('Check rows: ' + problems.join(', ') + (stopped ? ' | stopped: daily email quota reached' : ''));
return { sent: sent, items: items, problems: problems, stopped: stopped };
}
/** Passports > Mark selected renewal applied: sets Renewal to Applied, so renewal reminders stop. */
function markRenewalApplied() {
const ss = SpreadsheetApp.getActive();
const ui = SpreadsheetApp.getUi();
const sh = ss.getActiveSheet();
const r = sh.getActiveCell().getRow();
if (sh.getName() !== PASSPORTS || r < 2) { ui.alert('Select a document on the ' + PASSPORTS + ' tab first.'); return; }
const width = sh.getLastColumn();
const head = sh.getRange(1, 1, 1, width).getValues()[0].map((h) => String(h).trim().toLowerCase());
const row = sh.getRange(r, 1, 1, width).getValues()[0];
const w = head.indexOf('traveler'), d = head.indexOf('document'), ren = head.indexOf('renewal');
if (w < 0 || d < 0 || ren < 0) { ui.alert('The ' + PASSPORTS + ' tab needs Traveler, Document and Renewal columns.'); return; }
if (!String(row[w]).trim()) { ui.alert('Row ' + r + ' has no traveler.'); return; }
const name = String(row[w]).trim() + ', ' + String(row[d]).trim();
if (APPLIED.test(String(row[ren]).trim())) { ui.alert(name + ' is already marked Applied.'); return; }
if (ui.alert('Renewal applied', name + ': set Renewal to Applied?', ui.ButtonSet.YES_NO) !== ui.Button.YES) return;
sh.getRange(r, ren + 1).setValue('Applied');
ss.toast(name + ' marked Applied. Renewal reminders stop; trips are still checked.', 'Passports', 5);
}
What it sends, with the defaults:
- Before the renew-by date: one email when a document is 30 days or less from it (
SOON_DAYS). On November 23 that is Leo’s passport (27 days). - Once the renew-by date has passed: an email then and every 30 days until the document expires (
NOW_EVERY), and one more when it expires. On November 23 that is Maya’s passport and her expired passport card. - Trips at risk: any trip that isn’t over yet where the document runs out before Needed until, or where the document isn’t on the Passports tab, is listed when it is first found and then every 14 days (
TRIP_EVERY) until it is fixed or the trip is over. The script works this out itself from the Trips columns, so it doesn’t depend on the formulas. On November 23 that is Daniel’s work trip (with a note that his renewal is already applied), and Maya’s and Leo’s trips. - One email per address per run, with documents first and trips after, soonest first. On November 23 that is two emails: Maya gets 6 items (her two documents, Leo’s passport and three trips) and Daniel gets 1. Ana gets nothing.
- Applied means stop. A document whose Renewal is Applied gets no renewal reminders. When the new passport arrives, type its expiry date and last 4 and clear Renewal; the trips are checked against the new date.
- Never twice. Each reminder is written to the row’s Sent log as the expiry date plus a tag (for example
2026-11-10 expired, or for a trip the departure date, the expiry date and a 14-day step), so a second run the same day sends nothing, and a new expiry date starts the reminders over. - Safe by default. A document lock stops two runs overlapping, the Apps Script email quota (100 recipients a day on a consumer Gmail account, 1,500 on Google Workspace) is checked before each email, and rows with no real date or an unreadable lead are skipped and listed in the script’s log (with
console.log) instead of guessed at.
Marking a renewal applied: click any cell in the document’s row and choose Passports › Mark selected renewal applied. After you confirm, it sets Renewal to Applied.
Before every trip, and when a new passport arrives
- When you book, add a row per traveler on the Trips tab straight away and look up that destination’s rule for column E. Most problems show up months ahead this way, while a normal renewal still fits.
- When a new passport arrives, update Expires and Last 4 on its row and clear Renewal. The State Department’s advice for a new passport includes checking whether a visa in the old one can still be used and updating Trusted Traveler (Global Entry, NEXUS, SENTRI) details with the new number and dates, so add those as tasks if they apply to you.
- A week before you leave, check the trip’s row once more and look through the passports themselves. The State Department’s guidance for the travel industry also recommends 2 or more blank pages, which a spreadsheet can’t see.
Pitfalls
- Children’s passports. According to the State Department FAQ, a U.S. passport issued to a child under 16 is valid for 5 years and can’t be renewed, so “renewing” means a new application. Give those rows a longer lead if new applications take you longer.
- Names that don’t match. A name pasted with a stray space at the end doesn’t match the same name typed on the other tab. “US Passport” vs “US passport” is fine (the comparison ignores case), but “US pass” is not. The Traveler dropdown prevents most of it, Data › Data cleanup › Trim whitespace fixes pasted names, and No document tells you when a lookup fails.
- Counting from the wrong day. The rule is usually about the dates of the trip, so Needed until counts from the day you leave the destination. If a destination counts from your arrival or has its own wording, follow it, and when in doubt use the later date.
- Dates typed as text. Days left and EDATE need real dates. Select the column and use Format › Number › Date: a real date changes format, text doesn’t.
- Time zone. TODAY() and the script both use the spreadsheet’s time zone (File › Settings › Time zone), and the trigger fires in the Apps Script project’s time zone, so set both to where you live.
- Sharing. Anyone with edit access sees every row, and triggers run as whoever created them, so the emails come from that person’s account.
FAQ
How do I track passport expiration dates in Google Sheets?
Make a Passports tab with one row per document (traveler, document, last 4 digits, expiry date, how many months ahead you want to start renewing, email). Days left is =IF(OR(A2="", D2=""), "", D2-TODAY()), the renew-by date is =IF(D2="", "", EDATE(D2, -N(E2))), and a Status formula turns those into Expired, Renew now, Renew soon, OK or Applied.
How do I check a passport against the 6-month rule in Google Sheets?
Some destinations require a passport to be valid at least 6 months beyond the dates of your trip, and some airlines won’t let you board otherwise. Put each trip on a Trips tab with its return date and the number of months the destination asks for, then work out the date the passport must still be valid on with =IF(OR(A2="", D2=""), "", EDATE(D2, N(E2))) and compare it with the passport’s expiry date. If the expiry date is earlier, the passport has to be renewed before the trip, even if it hasn’t expired yet.
When should I start renewing a passport?
Early enough that the new one arrives before the old one drops inside the validity window of your next trip. The Lead (months) column sets that per document: in the example it is 9 months before expiry, which covers a 6-month rule plus time for the renewal. Processing times change, so check the current ones on travel.state.gov (or your own country’s passport office) and adjust the lead.
Can Google Sheets email me before my passport expires?
Not by itself: conditional formatting only colors cells. A short Apps Script on a daily time-driven trigger can, and the one on this page emails each address once when a document is 30 days from its renew-by date, again when that date passes (then every 30 days), once when it expires, and whenever an upcoming trip is at risk. An add-on such as SheetReminders sends date reminders without code.
How do I track passports for the whole family, including children?
Give every document its own row, with the traveler’s name on each, and put a parent’s email on a child’s rows so the reminders go to whoever handles the renewal. Children’s passports need their own lead: the U.S. State Department says a passport issued to a child under 16 is valid for 5 years and can’t be renewed, so you apply for a new one instead.
Should I keep passport numbers in a spreadsheet?
Keep as little as you need. This tracker stores only the last 4 digits, which is enough to tell two passports apart, and the dates. Anyone with access to the sheet sees every row, so share it only with the people who handle the family’s or team’s travel, and keep the passports themselves and any copies somewhere safer.
See SheetReminders
Short on time? Watch the 50-second version
Related Google Sheets guides
- How to generate a PDF or Google Doc for each row in Google Sheets
- Find and remove duplicates in Google Sheets
- Compare two columns or two sheets for duplicates
- Find case-insensitive and fuzzy duplicates in Google Sheets
- Best Autocrat alternatives for mail merge to PDF and Docs
- Make invoices or certificates from Google Sheets rows
- Create sales quotes or estimates from Google Sheets
- Generate receipts from Google Sheets rows
- Create purchase orders from Google Sheets
- Make packing slips from Google Sheets orders
- Generate a PDF certificate from a Google Form response
- Issue numbered training completion certificates with expiry dates
- Make a PDF progress report for each student
- Generate offer letters from a Google Sheets hiring tracker
- Generate contracts and agreements from a Google Docs template
- Make work orders for service jobs from Google Sheets
- Email each row’s PDF as an attachment
- Automatic email reminders from a date column
- Contract renewal and expiration alerts from Google Sheets
- Track certificate of insurance (COI) expirations in Google Sheets
- Track employee license and certification expirations
- Track equipment and vehicle maintenance with reminders
- Equipment sign-out sheet with due-back and overdue reminders
- Track warranty expiration dates with reminders
- Birthday and work anniversary reminders from Google Sheets
- Rent due and lease renewal reminders from Google Sheets
- Send invoice payment reminders from Google Sheets
- Highlight overdue tasks and send email reminders
- Follow-up reminders for leads, clients and candidates
- Membership renewal reminders for clubs and associations
- Appointment reminder emails for clients
- Probation and performance review reminders for managers
- Inventory expiration dates with email alerts
- Domain and SSL certificate renewal reminders
- Name badges and place cards from a guest list
- Vehicle registration, inspection and insurance reminders
- Event sign-in sheets and table seating lists
- Pet vaccination expiry reminders for owners
- Customer account statements with aging
- Subscription tracker with renewal and free-trial reminders
- Mailing labels: one per household, clean addresses
- Volunteer shifts: open slots, reminders and rosters
- Year-end donor giving statements, one PDF per donor
- Volunteer hours verification letters, one PDF per request
- Instrument calibration due dates with email reminders
- Pay stubs from a payroll sheet, one PDF per employee
- Gift certificates with codes, balances and a redemption log
- Bill due dates: mark paid, 30-day totals and reminders
- Grant deadlines: LOIs, reports, owners and reminders
- Class rosters: one PDF per class, A–Z, with seat counts
- Insurance renewals: premium changes and reminders
- Onboarding checklists: tasks from start dates, owner reminders
- Raffle tickets: numbered stubs, seller books, sales tracker
- SheetWeave vs Autocrat
- SheetWeave vs Document Studio
- SheetWeave vs RowDocs
Instructions refer to Google Sheets and Apps Script as they worked on November 23, 2026. Not legal or travel advice, and not affiliated with Google or any government. Google Sheets is a trademark of Google LLC. Entry and passport validity requirements are set by each country and can change; check the destination’s current requirements and your airline before you travel. Questions or corrections: hello@loomwise.app.