Mask an account number
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
Show only the last four characters of each account number, with four asterisks in front: ACC-77213904 becomes ****3904. Fill B2 and B3.
What this exercise teaches
RIGHT counts from the end, so it works whatever the length of the account number. LEFT counts from the start and MID from a position you choose.
A hint if you get stuck
RIGHT(text, 4) returns the last four characters. Join the asterisks in front with &.
Try it now, free, no account needed
Your first 15 exercises on Sheetsdrill are free. Open it on the practice page, solve it, and get instant feedback with a hint. A free account adds the worked solution; Pro unlocks every exercise, timed mode and the certificate.
Open this exerciseMore exercises in Text and dates
- First name with SPLIT
- Join the confirmed names
- Address without gaps
- Valid order IDs
- Pull out the invoice number
- Digits only
- Month label with TEXT
- Full years of service
- Working days with holidays
- Due at the end of next month
- Tidy up pasted names
- Items in a comma list
- Domain of an email address
- Renewal date with EDATE
- Orders placed at the weekend
- Amount inside a sentence
- The part before the @
- Ship-by date in working days
- Day of the week as a word
- Days until the deadline
- Flag addresses that are not emails