Thread: Naming a sheet
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Naming a sheet

Is it just

Private Sub SheetName()
With ActiveSheet
If .Range("B3").Value = " V014989" Then
.Name = "101"
ElseIf .Range("B3").Value = "V015013" Then
.Name = "102"
End If
End With
End Sub


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Mike" wrote in message
...
Hello
Account Numbers are in B3
Can someone help me with how to name a sheet with
IF B3 = V014989 Then
SheetName = 101
IF B3 = V015013 Then
SheetName = 102

This is what i have which returns the
Private Sub SheetName()
On Error Resume Next
ActiveSheet.Name = Range("B3") & Format(Now(), "[$-409] yy-mmm-d;@")
If Err.Number < 0 Then
MsgBox Err.Number & " -- " & Err.Description
End If
On Error GoTo 0


Thanks Mike