Change Tab name based on formula in cell D3 on each sheet

excelmeatman

New Member
Joined
Jan 27, 2016
Messages
1
In every D3 cell I have a date, formatted such as "01-Jan-16." What I want is for the name of each tab to automatically be renamed by pulling this data. The dates in cells D3 are figured by pulling the date in the previous sheet and adding 7 to get the new date (I create a new sheet each week).

I would like some sort of code which always makes the tab name reflect whatever date I have in cell D3 on each page. Any ideas? Tried watching some vids and trying different codes but nothing is quite working. I'm a noob at this but it's very interesting/helpful so any help is most appreciated! Thanks.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Code:
Sub rename_tab()

Dim ws As Worksheet


For Each ws In ThisWorkbook.Sheets


ws.Name = ws.Range("D3").Value


Next


End Sub
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,588
Members
449,039
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top