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

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
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,215,006
Messages
6,122,666
Members
449,091
Latest member
peppernaut

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