How can I format using excel from 1234567 to 12***67 with Format Cells > Custom?

Copper Contributor

I have many sensitive data to post at the bulletin board, like contact numbers which is beyond by the data privacy act, but I want to have them confirm if I have the updated contact number. I want my data from

1234567 to 12***67

8901234 to 89***34

This is not working for me ##"***"##. Thanks!

1 Reply


In Excel for the web, creating a custom number format to display data like "1234567" as "12***67" is not straightforward because custom number formats in Excel are primarily designed to format numbers and dates, not to obscure or partially mask sensitive data. Excel for the web may also have limitations compared to the desktop version when it comes to custom formatting.

However, if your primary concern is to partially mask sensitive data for privacy reasons, here's an alternative approach you can consider:

  1. Create a Helper Column:
    • In an adjacent column, create a formula that partially masks the data.

For example, if your data is in column A, you can use a formula like this in an adjacent column (let us say column B):

=LEFT(A1,2) & "****" & RIGHT(A1,2)

This formula takes the first two characters, adds "****" in the middle, and then adds the last two characters.

  1. Copy Values:
    • After you have created the masked data in column B, you can copy and paste the values from column B to column A as values to replace the original data.
  2. Share the Workbook:
    • If you need to share this workbook with others, you can share it while keeping the original data hidden. Provide access to only the columns with the masked data.

This approach ensures that the sensitive data is masked, and you can share the workbook without exposing the full data to others. Please note that while this method hides the sensitive data from casual viewers, it does not provide encryption or advanced security. For more advanced security and privacy protection, you may want to explore dedicated data masking or encryption tools.

The text and steps were edited with the help of AI.


My answers are voluntary and without guarantee!


Hope this will help you.

Was the answer useful? Mark them as helpful and like it!

This will help all forum participants.