How to Name Sheets Based on Cell Values (From List) in Excel?


Excel sheet names may significantly improve organisation and make it simpler to browse through your files. Using cell values from a list is a potent approach to give sheets names. In this article, we'll look at a step-by-step method for naming sheets automatically depending on particular cell values. You can use Excel's functionality to organise your workflow whether you have a lengthy list of departments, projects, or any other type of categorization system.

You will have the skills necessary to automate the process of naming sheets based on cell values by the end of this session. Let's get started and learn how to manage and identify your Excel sheets effectively!

Name Sheets Based on Cell Values (From List)

Here we will insert the VBA code into the sheet to complete the task. So let us see a simple process to learn how you can name sheets based on cell values (from a list) in Excel.

Step 1

Consider any Excel workbook.

First, right-click on the sheet name and select View code to open the VBA application.

Right Click > View Code.

Step 2

Then copy the below code into the text box.

Code

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set Target = Range("A1")
If Target = "" Then Exit Sub
Application.ActiveSheet.Name = VBA.Left(Target, 31)
Exit Sub
End Sub

In the code A1, is a cell containing the sheet name.

Step 3

Then close the VBA using Alt + Q. Then you can see that the sheet name will be changed dynamically with the cell value of A1.

This is how you can name sheets based on cell values in Excel.

Conclusion

In this tutorial, we have used a simple example to demonstrate how you can name sheets based on cell values (from a list) in Excel and highlight particular sets of data.

Updated on: 25-Aug-2023

212 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements