Formulyo

Excel + Google Sheets · RIGHT

Mask numbers with RIGHT

RIGHT returns the last characters of a text.

The formula

="**** " & RIGHT(A2, 4)

What each part means

Example

Before
AB
1AccountMasked
24539 1488 0343 6467
35500 0055 5555 5559
46011 1111 1111 1117
After
AB
1AccountMasked
24539 1488 0343 6467**** 6467
35500 0055 5555 5559**** 5559
46011 1111 1111 1117**** 1117

Step by step

  1. Click cell B2.
  2. Type the formula: ="**** " & RIGHT(A2, 4)
  3. Press Enter.
  4. Drag the small square in the bottom-right corner of the cell down to copy it to the other rows.

Where it works

The same formula in other languages

Get 1 formula a day, free

Plus a free weekly planner template for Excel and Google Sheets. Unsubscribe in 1 click.

✓ Done! Check your inbox to confirm.

Want ready-made templates? See the Formulyo pack →

Keep learning