ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   wsname value of range name (https://www.excelbanter.com/excel-programming/377497-wsname-value-range-name.html)

Helmut

wsname value of range name
 
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?

papou

wsname value of range name
 
Hello
Use Format:
Format(Worksheets("Master (2)").Range("month").value,"mmm-yy")

HTH
Cordially
Pascal

"Helmut" a écrit dans le message de news:
...
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?




Helmut

wsname value of range name
 
I get compile error: expected =

"papou" wrote:

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

HTH
Cordially
Pascal

"Helmut" a écrit dans le message de news:
...
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?





papou

wsname value of range name
 
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

"Helmut" a écrit dans le message de news:
...
I get compile error: expected =

"papou" wrote:

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

HTH
Cordially
Pascal

"Helmut" a écrit dans le message de
news:
...
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?








All times are GMT +1. The time now is 11:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com