Excel usedrange not updating
Note that instead of Merge and Center, I recommend using Centre Across Selection option.A lot of time, you may need to create versions of your work.This could be the case if you have sheet names as years or employee names or product names.'This code will sort the worksheets alphabetically Sub Sort Sheets Tab Name()Application.Screen Updating = False Dim Sh Count As Integer, i As Integer, j As Integer Sh Count = Sheets.Protect password:=password Next ws End Sub'This code will protect all the sheets at one go Sub Protect All Sheets()Dim ws As Worksheet Dim password As Stringpassword = "Test123" 'replace Test123 with the password you want For Each ws In Worksheetsws.Unprotect password:=password Next ws End Sub It's a common practice to merge cells to make it one.
A good practice is to save the file with timestamps.
Save As "C: Users Username Desktop Workbook Name" & timestamp End Sub You need to specify the folder location and the file name.
In the above code, "C: Users Username Desktop is the folder location I have used.
Using timestamps will allow you to go back to a certain file to see what changes were made or what data was used.
Here is the code that will automatically save the workbook in the specified folder and add a timestamp whenever it's saved.'This code will Save the File With a Timestamp in its name Sub Save Workbook With Time Stamp()Dim timestamp As Stringtimestamp = Format(Date, "dd-mm-yyyy") & "_" & Format(Time, "hh-ss")This Workbook.