Valid order IDs
A Google Sheets formula exercise from Sheetsdrill. Solve it with a formula bar on a live sheet in your browser, and it is checked the moment you submit.
The task
A valid order ID is exactly "ORD-" followed by four digits, in capitals. Count the valid IDs in column A with REGEXMATCH inside ARRAYFORMULA. Answer in D1.
What this exercise teaches
Without the anchors, "ORD-12345" would pass because it contains ORD- and four digits. REGEXMATCH is case sensitive.
A hint if you get stuck
^ marks the start and $ the end, so "^ORD-\d{4}$" allows nothing extra. \d means one digit.
This exercise is part of Pro
Pro unlocks all 50 exercises, with worked solutions and progress saved to your account. The free exercises work without an account.
You create a free account first, so Pro is attached to it.
Monthly is charged today and then every month until you cancel, in one click from your account page. Lifetime is one payment with no renewals. Full refund within 14 days of paying.