Results 1 to 5 of 5
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    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>

    Jerry

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: transform value inm momth name (2000)

    DAY_WEEK=Format(GIORNO, "dddd")

    Steve

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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
  •