For an Excel worksheet that contains many data columns, users tend to want to display only some of the data columns that are useful to them, while hiding data columns that are not needed. At the same time, different users of the required display of data columns are often not the same.
For example, for a student score sheet that contains multiple subjects, a language teacher may just want to see a language grade, and a math teacher may just want to see math scores. However, because the scores of several subjects are aggregated together, this will give the teacher to see the results of a single subject inconvenience. If you can quickly hide data columns that users do not need for the needs of different users, just leave the data columns that the user needs, so that users can easily focus on the data they need. Many users may say, this is too easy!
It's OK to hide the data columns that you don't need. Yes, but the question is, how do you hide it? If each user views each view by manually hiding and unhide the data column to operate, it would be too much trouble. However, you can easily solve this problem with Excel views and macros. The following is an example of a student's score sheet which contains a number of subjects to introduce the specific implementation methods.
First step: Create a user view
First, open the Student Performance Worksheet in Excel (Figure 1). Let's set up the language view, which shows only the language results. Select all data columns except the school number, name, and Language data column, right-click the selected data column heading, and choose Hide from the menu that pops up.
In this way, only the language results are left on the worksheet. Then, click the View-View Manager command, and then go to the View Manager dialog box. Click the Add button, enter "Chineseview" in the Name box (Figure 2), click OK to return, and the language view is created. Repeat the steps above to create additional views that you want.
Step two: Record view toggle Macros
When a view is created, it can be toggled through the view manager, but it is cumbersome to do so each time. Therefore, you can record the switch view action macro to reduce the switch operation steps. Let's start by recording a macro that looks at the language view. Click Tools-Macros-record new macros, enter view language in macro name, and click OK to start recording macros (Figure 3).
Next, click view → view Manager to enter the view manager. In the View list, select Chineseview and click the Show button. Finally, click the Stop Recording button to complete the recording of the macro. This way, the macro that looks at the language view is recorded. Repeat the steps above to record the other required macros in sequence.