Excel VBA - Automatically Rename WorkSheet Based on Cell Value

preview_player
Показать описание
VBA Code (Auto Rename Worksheet) 👇

My Excel Services on UpWork starting from $5/hour 👇

VBA code to rename worksheet | how to rename worksheet using VBA | VBA to rename sheet based on cell values | VBA button excel to pdf | Save Invoice Worksheet as PDF | Filename Based on Cell Value convert excel range to pdf | VBA save active sheet as pdf | auto-save invoice as pdf | invoice generator in excel | excel shortcuts | excel VBA for beginners | excel macro code | Excel Data Entry Form | Auto-filling Invoice in Excel | Excel Invoice Template | Excel Invoice Format billing | Leila Gharani | Excel for Freelancers | Excel hacks | Excel Shortcuts | Kevin Stratvert | Excel Superstar | Bright Side | Warikoo Data entry form in excel | data entry work in excel | excel for freelancers | how to make a data entry form in excel

Keep watching & Subscribe For More !!
Рекомендации по теме
Комментарии
Автор

Works perfect thanks. Did have a few issues for my use case.
1)file needs to be "macro enabled" (I'm working on an old spreadsheet so had to save as .xlsm)
2)the code seems to be a bit fussy about the contents of the cell. I want to use a date that is calculated from a formula and in the format DD.mm.yyyy and it just won't work. It's fine for plain text or numbers though

bindu
Автор

Is there a way this to all of the sheets and not just sheet 1? Or do I need to manually change every sheet one by one?

ryanpeterson
Автор

I cant get it to work... it doesn't automatically change names.

Tom-zqz
Автор

How do I combine this with tab color change vba

LuisRazo-gh
Автор

It works perfectly when you write in the name in the cell, but if you write in the name in a different sheet and then reference the name it doesn't work.

tobiasjonasson
Автор

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C1")) Is Nothing Then

If Range("C1") = Empty Then
ActiveSheet.Name = "NO NAME"
Else
On Error GoTo err
ActiveSheet.Name = Range("C1")
End If

End If
GoTo bypass
err: MsgBox "repetitious or non-permitted name"
Application.Undo
bypass:
End Sub

rzf