Bạn đang xem bài viết How To Protect / Lock Hidden Columns In Excel? được cập nhật mới nhất trên website Hoisinhvienqnam.edu.vn. Hy vọng những thông tin mà chúng tôi đã chia sẻ là hữu ích với bạn. Nếu nội dung hay, ý nghĩa bạn hãy chia sẻ với bạn bè của mình và luôn theo dõi, ủng hộ chúng tôi để cập nhật những thông tin mới nhất.
How to protect / lock hidden columns in Excel?
In Excel, Hide and Unhide columns are common functions that you may use them a lot, you can easily hide the columns and then unhide them again. But sometimes, you need to hide some columns which contain important data that you don’t want others to read. How could you protect the hidden columns not being unhide by others in Excel?
Protect or lock hidden columns with Excel feature
In Excel, the following steps can help you prevent the hidden columns from seeing, please do as this:
6. And in the Protect Sheet dialog, enter your password and confirm it. See screenshots:
And when you unhide the columns with the Unhide function, the Unhide tool will become gray, so that you can’t unhide the hidden columns. See screenshot:
Note: Because you have removed the locked status from all cells, you can enter data into the cells of worksheet as normal.
Easily protect/lock some cells/columns from editing in Excel
Kutools for Excel – Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required!
Protect/lock hidden columns with Kutools for Excel
If you have Kutools for Excel installed, its Selection Lock utility and Selection Unlock utility will help you much easier to protect/lock hidden columns in Excel. You can do as follows:
Kutools for Excel – Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Free Trial Now!
Notes: (1) Holding the Ctrl key, you can select multiple nonadjacent columns by selecting each column one by one; (2) Holding the Shift key, you can select multiple adjacent columns by selecting the first columns and the last one.
Then you will see hidden columns are locked and protected, while other cells in current sheet works as normal.
Kutools for Excel – Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required!
Demo: protect / lock hidden columns in Excel
Kutools for Excel – Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required!
Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails…
More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
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.
How To Quickly Unhide Columns In Excel
If you prefer written instruction instead, below is the tutorial.
Hidden rows and columns can be quite irritating at times.
Especially if someone else has hidden these and you forget to unhide it (or even worse, you don’t know how to unhide these).
While I can’t do anything about the first issue, I can show you how to unhide columns in Excel (the same techniques can also be used to unhide rows).
It may happen that one of the methods of unhiding columns/rows may not work for you. In that case, it is good to know the alternatives that can work.
How to Unhide Columns in Excel
There are many different situations where you may need to unhide the columns:
Multiple columns are hidden and you want to unhide all columns at once
You want to unhide a specific column (in between two columns)
You want to unhide the first column
Let’s go through each for these scenarios and see how to unhide the columns.
Unhide All Columns At One Go
If you have a worksheet that has multiple hidden columns, you don’t need to go hunt each one and bring it to light.
You can do that all in one go.
And there are multiple ways to do this.
Using the Format Option
Here are the steps to unhide all columns at one go:
No matter where that pesky column is hidden, this will unhide it.
Note: You can also use the keyboard shortcut Control A A (hold the control key and hit the A key twice) to select all the cells in the worksheet.
Using VBA
If you need to do this often, you can also use VBA to get this done.
The below code will unhide column in the worksheet.
Sub UnhideColumns () Cells.EntireColumn.Hidden = False EndSubYou need to place this code in the VB Editor (in a module).
If you want to learn how to do this with VBA, read a detailed guide on how to run a macro in Excel.
Using a Keyboard Shortcut
If you’re more comfortable using keyboard shortcuts, there is a way to unhide all columns with a few keystrokes.
Here are the steps:
Select any cell in the worksheet.
Press Control-A-A (hold the control key and press A twice). This will select all the cells in the worksheet
Use the following shortcut – ALT H O U L (one key at a time)
If you can get hang of this keyboard shortcut, it could be a lot faster to unhide columns.
Note: The reason you need to press A twice when holding the control key is that sometimes when you press Control A, it only selects the used range in Excel (or the area that has the data) and you need to press the A again to select the entire worksheet.
Another keyword shortcut that works for some and not for others is Control 0 (from a numeric keypad) or Control Shift 0 from a non-numeric keypad. It used to work for me earlier but doesn’t work anymore. Here is some discussion on why it may happen. I suggest you use the longer (ALT HOUL) shortcut that works every time.
Unhide Columns in Between Selected Columns
There are multiple ways you can quickly unhide columns in between selected columns. The methods shown here are useful when you want to unhide a specific column(s).
Let’s go through these one-by-one (and you can choose to use that you find the best).
Using a Keyboard Shortcut
Below are the steps:
Select the columns that contain the hidden columns in between. For example, if you are trying to unhide column C, then select column B and D.
Use the following shortcut – ALT H O U L (one key at a time)
This will instantly unhide the columns.
Using the Mouse
One quick and easy way to unhide a column is to use the mouse.
Below are the steps:
Hover your mouse in between the columns alphabets that have the hidden column(s). For example, if Column C is hidden, then hover the mouse between Column B and D (at the top of the worksheet). You will see a double line icon with arrows pointing on left and right.
Hold the left key of the mouse and drag it to the right. It will make the hidden column appear.
Using the Format Option in the Ribbon
Under the home tab in the ribbon, there are options to hide and unhide columns in Excel.
Here is how to use it:
Select the columns between which there are hidden columns.
Hover the cursor on Hide & Unhide option.
Using VBA
Below is the code that you can use to unhide columns in between the selected columns.
Sub UnhideAllColumns() Selection.EntireColumn.Hidden = False End Sub
You need to place this code in the VB Editor (in a module).
If you want to learn how to do this with VBA, read a detailed guide on how to run a macro in Excel.
By Changing the Column Width
There is a possibility that none of these methods work when you try to unhide column in Excel. It happens when you change the Column Width to 0. In that case, even if you unhide the column, it’s width still remains 0, and hence you can’t see it or select it.
Below are the steps to change the column width:
In the name box, type any cell address in that column. For example, if it is column C, type C1.
Although the column is not visible, the cursor would go in between B1 and D1 (indicating that C1 has been selected).
Enter a column width value to make the column visible.
This is by far the most reliable way to unhide columns in Excel. If everything fails, just change the column width.
Unhide the First Column
Unhiding the first column can be a little bit tricky.
You can use many of the methods covered above, with a little bit of extra work.
Let me show you a few ways.
Use the Mouse to Drag the First Column
Even when the first column is hidden, Excel allows you to select it and drag it to make it visible.
To do this, hover the cursor on the left edge of column B (or whatever is the leftmost visible column).
The cursor would change into a double arrow pointer as shown below.
Hold the left mouse button and drag the cursor to the right. You will see that it unhides the hidden column.
Go to a Cell in the First Column and Unhide it
But how do you go to any cell in the column that’s hidden?
Good question!
You use the Name Box (it’s left to the formula bar).
Enter A1 in the Name Box. It will instantly take you to the A1 cell. Since the first column is hidden, you won’t be able to see it, but be assured that it’s selected (you’ll still see a thin line just left of B1).
Once the hidden column cell is selected, follow the below steps:
Hover the cursor on the ‘Hide & Unhide’ option.
Select the First Column and Unhide it
Again! How do you select it when it’s hidden?
Well, there are many different ways to skin the cat.
And this is just another method in my kitty (this is the last cat sounding reference I promise).
When you select the leftmost visible cell and drag the cursor to the left (where there are row numbers), you end up selecting all the hidden columns (even when you don’t see it).
Once you have select all the hidden columns, follow the below steps:
Hover the cursor on the ‘Hide & Unhide’ option.
Check The Number of Hidden Columns
Excel has an ‘Inspect Document’ feature that is meant to quickly scan the workbook and give you some details about it.
And one of the things that you can do that ‘Inspect Document’ is to quickly check how many hidden columns or hidden rows are there in the workbook.
This might be useful when you get the workbook from someone and want to quickly inspect it.
Below are the steps on how to check the total number of hidden columns or hidden rows:
Open the workbook
In the Document Inspector, make sure Hidden Rows and Columns option is checked.
This will show you the total number of hidden rows and columns.
It also gives you the option to delete all these hidden rows/columns. This can be the case if there is extra data that has been hidden and is not needed. Instead of finding hidden rows and columns, you can quickly delete these from this option.
You May Also Like the following Excel Tips/Tutorials:
How To Find Column Index Number From Table In Excel
Scenario:
Many times when working with long scattered data, we need to first clean data before working on it. It takes time and you just wanted to extract some queries. To extract data, you generally use the VLOOKUP function . But when we have long data with many column fields, then it gets messy because VLOOKUP function requires the correct column index as number, or else the formula returns error. Right there, below is the formula explanation for this kind of problem.
How to solve the problem?
For this we will use the MATCH function . If you haven’t heard of this function, get used to it. It is an excel lookup function which returns the Index of the lookup value in the array. Here we need to get Index number of the column name. Then we will proceed to further step How to lookup values in tables using the MATCH function. Below is the Generic formula
Generic formula:
column_name : lookup value
table_header : table header array
0 : lookup for exact match
Example :
All of these might be confusing to understand. Let’s understand the formula with explanation and example. Here we have a data table in Sheet 1 ($A$1:$U$9995). So we have the table header as A1:U1 (The first row of the table).
Use the formula
Explanation:
MATCH function looks up value in C4 cell “Order ID”
Sheet1!$A$1:$U$1 is the lookup array argument.
0 argument is given to look up for exact match.
Use the formula.
MATCH index in VLOOKUP function:
Now we have the solution for, how to get the column index of the table. We can use the formula as input to the VLOOKUP function. For example, we need the product name bought by the customer name “Pete Kriz”.
Use the formula:
Note: make sure lookup value in D10 (Pete Kriz) must be in the first column of the table.
Here are all the observational notes regarding using the formula.
Notes:
The formula works for text and numbers both.
The function returns the #NA error if the lookup array argument to the MATCH function is not of the same length of the table array.
The formula returns an error if lookup_value doesn’t match the value in the table lookup_array.
The function matches the exact value as the match type argument to the MATCH function is 0.
Use the argument -1 for less than, 0 for exact match and 1 for the greater than the lookup match.
The lookup values can be given as cell reference or directly using quote symbol ( ” ) in the formula as arguments.
Hope you understood How to extract the column index from the table in Excel. Explore more articles on Excel lookup value & Excel 2019 functions here. If you liked our blogs, share it with your friends on . And also you can follow us on and . We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write to us at info@exceltip.com .
Related Articles Popular Articles:
How To Randomize A List In Excel: Sort Randomly Cells, Rows And Columns
The tutorial will teach you two quick ways to randomize in Excel: perform random sort with formulas and shuffle data by using a special tool.
Microsoft Excel provides a handful of different sorting options including ascending or descending order, by color or icon, as well as custom sort. However, it lacks one important feature – random sort. This functionality would come in handy in situations when you need to randomize data, say, for an unbiased assigning of tasks, allocation of shifts, or picking a lottery winner. This tutorial will teach you a couple of easy ways to do random sort in Excel.
How to randomize a list in Excel with a formula
Although there is no native function to perform random sort in Excel, there is a function to generate random numbers (Excel RAND function) and we are going to use it.
Assuming you have a list of names in column A, please follow these steps to randomize your list:
Insert a new column next to the list of names you want to randomize. If your dataset consists of a single column, skip this step.
In the first cell of the inserted column, enter the RAND formula: =RAND()
Either way, Excel automatically expands the selection and sorts the names in column A as well:
Tips & notes:
Excel RAND is a volatile function, meaning that new random numbers are generated every time the worksheet is recalculated. So, if you are not happy with how your list has been randomized, keep hitting the sort button until you get the desired result.
To prevent the random numbers from recalculating with every change you make to the worksheet, copy the random numbers, and then paste them as values by using the Paste Special feature. Or, simply delete the column with the RAND formula if you don’t need it any longer.
The same approach can be used to randomize multiple columns. To have it done, place two or more columns side by side so that the columns are contiguous, and then perform the above steps.
How to shuffle data in Excel with Ultimate Suite
If you don’t have time to fiddle with formulas, use the Shuffle Cells tool included in our Ultimate Suite for Excel to do a random sort faster.
The Shuffle pane will appear on the left side of your workbook. You select the range where you want to shuffle data, and then choose one of the following options:
Cells in each row – shuffle cells in each row individually.
Cells in each column – randomly sort cells in each column.
Entire rows – shuffle rows in the selected range.
Entire columns – randomize the order of columns in the range.
All cells in the range – randomize all cells in the selected range.
In this example, we need to shuffle cells in column A, so we go with the third option:
And voilà, our list of names is randomized in no time:
If you are curious to try this and explore a lot more fascinating features included with Ultimate Suite for Excel, you are welcome to download a 14-day trial version.
You may also be interested in
Cập nhật thông tin chi tiết về How To Protect / Lock Hidden Columns In Excel? trên website Hoisinhvienqnam.edu.vn. Hy vọng nội dung bài viết sẽ đáp ứng được nhu cầu của bạn, chúng tôi sẽ thường xuyên cập nhật mới nội dung để bạn nhận được thông tin nhanh chóng và chính xác nhất. Chúc bạn một ngày tốt lành!