How to Hide Part of Text in Excel Cells (2 Effective Methods)

When working with Excel, it might be needed sometimes to hide some part of a text. Now, if you are looking for ways to do so, you have landed in the perfect place. In this article, I will demonstrate to you 2 effective methods to hide part of a text in Excel cells.


How to Hide Part of Text in Excel Cells: 2 Effective Methods

Say, we have a dataset of 5 employees’ phone numbers. But, we don’t want to show it to everyone. So, we need to hide some part of the text of the phone number cells. You can accomplish this result using any of the following methods.

Sample Dataset to Hide Part of Text in Excel Cells

Here, we have used the Microsoft 365 version of Microsoft Excel. But, you can use all of these methods to any versions of Excel. If you face any problems to do so, please leave a comment below.


1. Use a Suitable Custom Format

You can easily hide a part of a text in an Excel cell using a custom format. Go through the steps below to do this.

📌 Steps:

  • First and foremost, select the dataset (C5 to C9 cells here) where you want to hide parts of texts in same sequence.
  • Following, right-click on your mouse upon the selection.

Select Dataset to Apply Custom Format

  • Afterward, choose the Format Cells… option from the context menu.

Access the Format Cells Dialogue Box

  • Consequently, the Format Cells window will appear.
  • Select Custom from the Category pane and in the Type: text box, write the following format.
"+"164"**-***-***"
  • Finally, click on the OK button.

Apply Custom Format to Hide Part of Text in Excel Cells

As a result, you will see you have hidden the phone numbers of all your employees in a certain sequence.

Dataset with Hidden Parts


2. Apply Excel Functions to Hide Specific Parts of Text

Besides, you can also apply different formulas to hide different parts of text in Excel cells.

2.1 Hide Right Part of Text Using LEFT Function

Using the LEFT function, you can hide parts of text from the starting of the text. Follow the steps below to perform this.

📌 Steps:

  • At the very beginning, create a new column named Output to put the required formula and get the desired output.

Create New Column to Get Output

  • Afterward, click on the D5 cell and insert the following formula.
=LEFT(C5,6)&"******"
  • Subsequently, hit the Enter button.
  • As a result, you will get the phone number with the first 6 digits and the rest hidden as star (*) marks.

Use the LEFT Function to Hide Right Part of Text in Excel Cells

  • Now, place your cursor in the bottom-right position of the D5 cell.
  • When the Fill Handle appears, drag it below to copy the same formula for all the other cells below.

Drag the Fill Handle Below to Copy Same Formula

As a result, you will get all your employees’ phone numbers with some hidden parts. And, the output would look like this.

Result with Hidden Parts


2.2 Hide Left Part of Text Using RIGHT Function

Now, say you want to show the last part of the phone number and hide the first part of the number. You can do this using the RIGHT function. Follow the steps below to do this.

📌 Steps:

  • First and foremost, click on the D5 cell.
  • Subsequently, write the following formula in the formula bar of the cell.
="*********"&RIGHT(C5,3)
  • Afterward, press the Enter button.

Use the RIGHT Function to Hide Left Part of Text in Excel Cells

  • At this time, place your cursor in the bottom right position of the D5 cell.
  • Subsequently, a black Fill Handle will appear. Following, drag it down to copy the same formula for all the cells below.

Drag Fill Handle Below to Copy Same Formula

Consequently, you will see that, you have hidden the first part of the phone number and kept only the last 3 digits visible for each employee’s phone number. For instance, the outcome should look like this.

Output with Hidden Parts


2.3 Hide Left & Right Part of Text Using MID Function

Now, if you want to show parts from the middle of a text, you can use the MID function. Go through the steps below to achieve this.

📌 Steps:

  • Initially, click on the D5 cell.
  • Afterward, put the following formula in the formula bar.
="*****"&MID(C5,6,3)&"****"
  • Subsequently, press the Enter button.

Use the MID Function to Hide Left & Right Part of Text in Excel Cells

  • As a result, you will successfully hide the first and last part of the cell value and show only 3 digits from the middle.
  • Now, put your cursor in the bottom-right position of the cell and drag the Fill Handle downward upon its appearance.

Drag Fill Handle Below to Copy Same Formula

Thus, you will successfully hide the first and last parts of all the phone numbers. And, the outcome would look like this.

Phone Numbers with Hidden Parts

Read More: How to Hide Confidential Data in Excel


How to Hide Full Text in Excel Cells

So far we have discussed how to hide text partially in Excel cells. Now, if you want to hide the full text in an Excel cell, follow the steps below.

📌 Steps:

  • First, select the range that you want to hide (C5 to C9 cells here).
  • Afterward, right-click on your mouse.

Select Dataset to Hide Full Text

  • Subsequently, choose the Format Cells… option from the context menu.

Choose Format Cells Option to Apply Custom Format

  • As a result, the Format Cells dialogue box will appear.
  • Choose the Custom option from the Category Pane.
  • Afterward, at the Type: box, write three semicolons consecutively (;;;).
  • Finally, click on the OK button.

Custom Format to Hide Full Text in Excel Cells

Consequently, you can hide the full text of all these cells. Here, the values remain but are not shown in the cell. For example, the result would look like this.

Dataset with Hidden Texts

Read More: Hide Data in Excel


Download Practice Workbook

You can download our practice workbook from here for free!


Conclusion

To sum up, in this article, I have shown you 2 effective methods to hide part of text in Excel cells. I would suggest you go through the full article carefully and practice each of the ways on your own. I hope you find this article helpful and informative. If you have any further queries or recommendations, please feel free to comment here.


Related Articles


<< Go Back to Hide Cells | Excel Cells | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Tanjim Reza
Tanjim Reza

Md. Tanjim Reza Tanim, a BUET graduate in Naval Architecture & Marine Engineering, contributed over one and a half years to the ExcelDemy project. As an Excel & VBA Content Developer, he authored 100+ articles and, as Team Leader, reviewed 150+ articles. Tanim, leading research, ensures top-notch content on MS Excel features, formulas, solutions, tips, and tricks. His expertise spans Microsoft Office Suites, Automating Finance Templates, VBA, Python, and Developing Excel Applications, showcasing a multifaceted commitment to the... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo