How to Refresh Formulas

KLEINMAN

New Member
Joined
Dec 6, 2015
Messages
20
Hi,

I am currently letting a code that I have pasted into the sheet itself

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("B1")) Is Nothing Then
ActiveSheet.Name = ActiveSheet.Range("B1")
'recalculate all open workbooks

End If
'recalculate all open workbooks
Application.Calculate

'recalculate a specific worksheet
Worksheet(1).Calculate

' recalculate a specific range
Worksheet(1).Columns(1).Calculate
End Sub

name my sheet according to what is in B1.

The problem I have is B1 pulls from a masterfile that is in the same document.

If I change the master file B1 in the sheet does change to the new name but the sheet name doesn't change.

I have to click on the formula and press enter before it applies the changes to the sheet name.

I hope it makes sense.

Kind Regards

Stephan van Niekerk
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Thank you so much for the reply. Being a novice I am not sure how to do this. Any aid will really be appreciated.
 
Upvote 0

Forum statistics

Threads
1,215,110
Messages
6,123,148
Members
449,098
Latest member
Doanvanhieu

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