

- #How do i hide columns in excel 2007 how to
- #How do i hide columns in excel 2007 full
- #How do i hide columns in excel 2007 code
This code will trigger anytime the dropdown value is changed. If Not Application.Intersect(Ke圜ells, Range(Target.Address)) Is Nothing ThenĪctiveWorkbook.CustomViews(Cells( 2, 1).Value).Show Double click the sheet where your dropdown is located and, in the window that opens, place this code: Private Sub Worksheet_Change(ByVal Target As Range) Now, press alt + F11 to open the VBA editor. In this example, I’ve chosen to put the dropdown in cell A2 below the title of the spreadsheet so it is always visible regardless of zoom. It is important to consider which rows/columns you’re hiding so you don’t hide the dropdown from your user. Secondly, the location of your dropdown matters. It’s important the values in the dropdown match exactly to the names of your custom views. I generally create my list on a separate tab called “Criteria” and hide that tab. We will put our dropdown on the tab whose view we want change.
#How do i hide columns in excel 2007 how to
If this is new to you, read here to learn how to create dropdowns in Excel. Before we get started writing the code though, we need to set up our own custom dropdown. Don’t let that scare you off though, this approach only requires a couple of simple lines of code to manage. “Using VBA” might intimidate you if you’ve never written a line of code in your life. These issues are why I generally gravitate towards the final approach. Not a huge deal, but may not be what you want. Also, the toolbar dropdown will always be there, even if there are no custom views saved in the workbook. So, even though you’ve added the Excel custom views dropdown to your toolbar, others will likely have to be instructed to do so. The quick access toolbar is only saved in the settings for you as a user. Now that you’ve created the dropdown, you can select any of the views from it and they’ll be applied! There are a few cons to mention with this approach. We have already covered “Add” and the last option “Delete” will delete the selected custom view. “Close” will close the custom views window. Alternatively, you can click “Show” to apply the currently selected view. Simply click on “Custom Views” on the “Views” ribbon and you can double click any of the views you have created. The custom views interface already allows you apply views from it’s interface after you have created them. Three Ways to Apply Excel Custom Views Use Custom Views Interface to Apply Views I have also created several other views to demo the different ways to apply custom views in Excel. We now have a basic view that will hide columns in Excel whenever we apply it.

In my example, I’ve hidden the quarters columns and increased the zoom to 115%. Once you’ve hidden your desired rows/columns and adjusted your zoom to something appropriate, then follow the same process as above to create a view of the current setup. This saves a lot of time when creating these views.

It will hide whichever row/column is related to whatever selection you define. A little-known side note here, a shortcut to hide columns in Excel is ctrl + 0 and the shortcut to hide rows is ctrl + 9. Next, start creating your first view by hiding applicable rows/columns.

In the next window, name the view whatever you like, I prefer “Default – All Detail”. To do so, before you start organizing any views, click on “Custom Views” on the “View” ribbon, then click “Add”.
#How do i hide columns in excel 2007 full
This allows me to always get back to my full data view quickly. I like to create my first custom view as “Default”. Creating Excel Custom Viewsįor those of you asking yourselves “I didn’t know about the Excel custom views feature?”, let’s first cover how to create a basic custom view in Excel. Therefore, creating custom views could be a much quicker approach. You could write some macros that would hide columns/rows based on certain criteria (shameless plug: check out the VBA Starter Kit section for an example of this), but this could be unnecessarily complex in a real-world example. It would likely be beneficial to allow the user to quickly switch between views of quarters only, no quarters, all detail, USA detail only, etc. There is a lot of detail here that may or may not be necessary depending on the audience.
