Thread: transform value inm momth name (2000)

1. transform value inm momth name (2000)

Why in B1 have DICEMBRE, in C1 have GENNAIO...in M1 have GENNAIO instead B1=Gennaio, C1=Febbraio...M1=Dicembre????

2. Re: transform value inm momth name (2000)

Try this,

<pre>Sub UNO_CALENDARIO()

Dim INTMESE As Integer, INTANNO As Integer, GIORNI As Integer, GIORNO As Date
Dim G As Integer, Y As Integer, M As Integer, MESE_INTERO As String
INTANNO = Range("A1")

Range("B1:M33").ClearContents

For Y = 1 To 12

INTMESE = Y

GIORNI = Day(DateSerial(INTANNO, INTMESE + 1, 0))

Cells(1, 2 + M) = UCase(Format(DateSerial(1, Y, 1), "mmmm"))

For G = 1 To GIORNI
GIORNO = DateSerial(INTANNO, INTMESE, G)
Cells(G + 1, 2 + M) = GIORNO
Next G
M = M + 1

Next Y

End Sub
</pre>

3. Re: transform value inm momth name (2000)

Resolved my self...
Tks.

tks Jerry, work now!

... but is possible to transform the day of month in day of week and store the value in DAY_WEEK

for example:
...
aftre this line
Cells(G + 1, 2 + M) = GIORNO

if the value of GIORNO=21/09/2008
DAY_WEEK=Domenica
....

4. Re: transform value inm momth name (2000)

DAY_WEEK=Format(GIORNO, "dddd")

Steve

5. Re: transform value inm momth name (2000)

good!
saved me.
Tks.

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•