WWW Extendoffice Com Documents Excel 5824 Excel Mask Characters in Cell Html#for
WWW Extendoffice Com Documents Excel 5824 Excel Mask Characters in Cell Html#for
in
Note: The other languages of the website are Google-translated. Back to
Register
English
Languages
ExtendOf몭ce
Office Tab
>> QUICK
Office Tab Kutools for Excel
NAVIGATION
Kutools for Excel Kutools for Word
Products Download
Kutools for Word Kutools for Outlook
Kutools for Outlook How to Install or Uninstall
End User License Agreement
Tips & Tricks for Excel
Tips & Tricks for Word
Office Tab
Tips & Tricks for Outlook
Kutools for Excel
Purchase Resources Excel Functions
Kutools for Word
Excel Formulas
Kutools for Outlook
Excel Charts
Outlook Tutorials
Online Tutorials
Office Tab
Cookies used on the website!
Kutools for Excel
This website uses cookies to ensure you get
the best experience on our website.
Kutools for Word
Kutools for Outlook
Kutools for Excel Solves Most of Your Problems, and
ExtendOffice Cookies Policy
Increases Your Productivity By 80%. Full Features 30-day
News and Updates
Got it!
i
Free Trial.
Free Trial.
Office Tab
Yes please!
Kutools for Excel
Kutools for Word
Kutools for Outlook
Search
Search more
Support
About Us
Our Team
User Testimonials
Users Say
Get Help?
Retrieve License
Lost License?
Report a Bug
Bug Report
Forum
Post in Forum
Contact Us
Talk to us via email
Excel Tips Excel Functions Excel Formulas Excel Charts Word Tips
Outlook Tips
Three methods quickly hide/mask cell contents with
asterisk or other string in Excel
Sometimes, you may want to hide some cell contents while you sharing the workbook to
other users as below screenshot shown. Here, this article will introduce three methods on
masking cells with asterisk for hiding the contents in Excel.
Hide and mask cell contents with asterisk with Format Cells
Hide and mask cell contents with asterisk with VBA code
Encrypt and mask cell contents with asterisk or other string
Other relatived articles (operations) about worksheet
Hide and mask cell contents with asterisk with Format Cells
In Excel, to mask cell contents with asterisk, you can use the Format Cells function.
1. Select the cells you want to hide with asterisk, then right click to select Format Cells
from the context menu.
2. In the Format Cells dialog, under Number tab, select Custom from Category list, and
then type ;;;** into the textbox under Type.
3. Click OK, now the select cell contents have been masked with asterisks.
But the cell contents also can be viewed in the formula bar.
4. Place cursor at the cell you do not want to hide contents, then click Review > Protect
Sheet, and uncheck Select unlock cells and Format cells option (other options you can
check as you need), then type and con몭rm the password for protecting the sheet in the
popping dialogs.
Then the cell contents have been hidden and masked with asterisks.
Note: If the cell contents are numeric string, this way only with display the cell contents as
blank.
Hide rows with #N/A or other specific error values by VBA code
If you want to mask both numbers and texts, you can apply VBA code.
1. Select the cells you want to encrypt, and press Alt + F11 keys to enable Microsoft
Visual Basic for Applications window.
2. Click Insert > Module, then copy and paste below code to the new Module.
1 Sub E_Cells()
2 'UpdatebyExtendoffice
3 Dim xRg As Range
4 Dim xERg As Range
5 Dim xWs As Worksheet
6 Dim xStrRg As String
7 Dim xStrPw As String
8 xStrPw = ""
9 xStrPw = Application.InputBox("Enter Password", "", "", Type:=2)
10 If xStrPw = "" Then Exit Sub
11 On Error Resume Next
12 Set xERg = Selection
13 Set xWs = Application.ActiveSheet
14 Set xRg = xWs.Cells
15 xRg.Locked = False
16 xERg.Locked = True
17 xERg.NumberFormatLocal = "**;**;**;**"
18 xWs.Protect Password:=xStrPw, DrawingObjects:=True, Contents:=True, Scenari
19 End Sub
3. Press F5 key to run the code. And then type password in the popping out dialog, and
click the OK button. See screenshot:
Tip:
1. For decrypting the cells, you can use below macro code.
1 Sub D_Cells()
2 'UpdatebyExtendoffice
3 Dim xRg As Range
4 Dim xERg As Range
5 Dim xWs As Worksheet
6 Dim xStrRg As String
7 Dim xStrPw As String
8 xStrPw = ""
9 xStrPw = Application.InputBox("Type Password", "", "", Type:=2)
10 If xStrPw = "" Then Exit Sub
11 On Error Resume Next
12 Set xWs = Application.ActiveSheet
13 Set xRg = xWs.UsedRange
14 xERg.NumberFormatLocal = "**;**;**;**"
15 xWs.Unprotect Password:=xStrPw
16 For Each xERg In xRg
17 If xERg.Locked Then xERg.NumberFormatLocal = "@"
18 Next
19 End Sub
2. With the VBA code, the cell contents also can be viewed in formula bar.
Encrypt and mask cell contents with asterisk or other string
If you want to encrypt and mask cell contents with the special string as you need, the
Encrypt Cells feature of Kutools for Excel can do a nice favor.
300
advanced tools for solving your 90%
Excel puzzles, and provides you a
30
-day free trial.
Free Download
After free installing Kutools for Excel (60-day free trial), please do as below steps.
1. Select the cells you want to mask, then click Kutools Plus > Encrypt Cells.
2. Then in the popping dialog, type and con몭rm the password, then in Mask section, check
the option as you need.
3. Then click Ok. At present, all selected cells have been masked.
Check Char option, you can type any character into the textbox, then the cells will display
the character only.
Check String option, then type the string you want the cells display.
Tip: if you want to decrypt the cells or display the cell contents, you can click Kutools Plus
> Decrypt Cells, then type the password to successfully decrypt.
Other Operations (Articles) Related To Hidding
The Best Office Productivity Tools
Kutools for Excel Solves Most of Your Problems, and Increases Your
Productivity by 80%
Reuse: Quickly insert complex formulas, charts and anything that you have used
before; Encrypt Cells with password; Create Mailing List and send emails...
Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily
read and edit large numbers of cells); Paste to Filtered Range...
Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate
Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find
and Fuzzy Find in Many Workbooks; Random Select...
Exact Copy Multiple Cells without changing formula reference; Auto Create References
to Multiple Sheets; Insert Bullets, Check Boxes and more...
Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging
Subtotals; Convert Between Cells Content and Comments...
Super Filter (save and apply filter schemes to other sheets); Advanced Sort by
month/week/day, frequency and more; Special Filter by bold, italic...
Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data
into Multiple Sheets; Batch Convert xls, xlsx and PDF...
More than 300 powerful features. Supports Office / Excel 20072021 and 365. Supports
all languages. Easy deploying in your enterprise or organization. Full features 30day
free trial. 60day money back guarantee.
Office Tab Brings Tabbed interface to Office, and Make Your Work Much
Easier
Office Tab Brings Tabbed interface to Office, and Make Your Work Much
Easier
Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access,
Visio and Project.
Open and create multiple documents in new tabs of the same window, rather than in
new windows.
Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every
day!
Oldest First
Comments (5)
No ratings yet. Be the first to rate!
Please help.
Reply · Report · 0 · 0
몭LEFT몭A1,3몭&REPT몭"*",LEN몭A1몭몭6몭&RIGHT몭A1,3몭
Explanation:
1. LEFT 몭 Will add some letters from the left of the phrase.2. REPT 몭 Will
repeat *, n times. where n can be LEN몭A1몭 or LEN몭A1몭몭X where X is the
number fo letters that you want to keep showing3. RIGHT 몭 Will add some
number fo letters that you want to keep showing3. RIGHT 몭 Will add some
letters from the end of the phrase.
If A1 content is [email protected] formula will result in:
foo***********com
Reply · 0 · 0
Formula:=LEFT몭A1,3몭&REPT몭"*",LEN몭A1몭몭6몭&RIGHT몭A1,3몭
Remove left or/and right and change the length to control what to replace
with * and what to keep at the beginning or at the end.
Reply · Report · 0 · 0
Name 몭Required)
Email 몭Required)
HomeKnowledgeSupportForumPrivacy PolicyAbout Us
Follow Us