wsname value of range name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have this formula

Worksheets("Master (2)").Name = Worksheets("Master (2)").Range("month").value

the result is 38838 which is the numerical value of the date - what I need
is the either mmm-yy value of the Range("month").value

in other words, I would like the worksheetname to be: May or May 06

can anyone help?
 
Hello
Use Format:
Format(Worksheets("Master (2)").Range("month").value,"mmm-yy")

HTH
Cordially
Pascal
 
I get compile error: expected =

papou said:
Hello
Use Format:
Format(Worksheets("Master (2)").Range("month").value,"mmm-yy")

HTH
Cordially
Pascal
 
Helmut
This was just to show what you needed to amend in your code.
So your code should look like this:
Worksheets("Master (2)").Name = _
Format(Worksheets("Master (2)").Range("month").value,"mmm-yy")

HTH
Cordially
Pascal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top