+ Reply to Thread
Results 1 to 7 of 7

Convert a multiple year list of 365 days/year into an equivalent of 360 days/year

  1. #1
    Registered User
    Join Date
    07-21-2012
    Location
    Italia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Unhappy Convert a multiple year list of 365 days/year into an equivalent of 360 days/year

    Good Evening everyone in the forum
    this is my first post.
    I am a debutant with climate modelling and I want to do daily analysis (temperatures, rains) ..so my software produce a 10 year column (365values*10 + leap years)
    Unfortunately some english climate models produce series of 360 days/year that the software is not able to recognize and print via excel (I have 2003 version) 365days year.
    This is a problem because enlarging the serie to decades the 5 days gap get bigger and completaly flip flop season producing outputs labeled as december that are actually in august...

    My question is if having a single column daily values in 365 or 366 days a year

    01/01/1951
    02/01/1951
    . . .
    31/01/1951
    01/02/1951
    . . .
    . . .
    . . .
    28/02/1951
    01/03/1951

    can be converted (with a macro???) in a 30 day a month (and 360 days a yeear list

    01/01/1951
    02/01/1951
    . . .
    30/01/1951
    01/02/1951
    . . .
    . . .
    . . .
    30/02/1951
    01/03/1951
    .
    .
    .
    .
    .
    30/12/2099


    I hope it was clear

    Thanks for any help you can provide

    Cheers

    Andrea

  2. #2
    Forum Contributor
    Join Date
    03-21-2012
    Location
    Ho Chi Minh city
    MS-Off Ver
    Excel 2003
    Posts
    180

    Re: Convert a multiple year list of 365 days/year into an equivalent of 360 days/year

    ? First day 1/1/1900 (365) <=> 1/1/1900 (360)

  3. #3
    Forum Contributor
    Join Date
    03-21-2012
    Location
    Ho Chi Minh city
    MS-Off Ver
    Excel 2003
    Posts
    180

    Re: Convert a multiple year list of 365 days/year into an equivalent of 360 days/year

    #1/1/1900# <> @1/1/1900@
    #7/23/2012# => @DD/MM/yyyy@

    NumDate = CLng(DateSerial(2012, 7, 23))

    yyyy = 1900 + Int(NumDate / 360)

    MM = Int((NumDate mod 360) / 30)

    DD = NumDate - yyyy * 360 - MM * 30

    => @2/13/2014@

  4. #4
    Registered User
    Join Date
    07-21-2012
    Location
    Italia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Convert a multiple year list of 365 days/year into an equivalent of 360 days/year

    ehy thank youvery much for answering so quickly!

    I have a problem on your answer
    is "dateserial" a function in excel? because i am afraid excel does not recognize it (2003 or 2010).
    what actually the @ symbols means?
    Thanks
    cheers
    andrea

  5. #5
    Forum Contributor
    Join Date
    03-21-2012
    Location
    Ho Chi Minh city
    MS-Off Ver
    Excel 2003
    Posts
    180

    Re: Convert a multiple year list of 365 days/year into an equivalent of 360 days/year

    DataSerial(Year,Month,Day): this is Function in VBA

    (In VBA)
    #2/13/2012# Date type for normal;

    @2/13/2014@ Date type for You!

  6. #6
    Registered User
    Join Date
    07-21-2012
    Location
    Italia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Convert a multiple year list of 365 days/year into an equivalent of 360 days/year

    Many thanks for your reply again
    I got the logic of the commands

    yyyy = 1900 + Int(NumDate / 360)
    MM = Int((NumDate mod 360) / 30)
    DD = NumDate - yyyy * 360 - MM * 30

    and i implemented them in a macro

    But still I dont get the meaning of these 2 strings (the begin and the end of the series )
    #1/1/1900# <> @1/1/1900@
    #7/23/2012# => @DD/MM/yyyy@

    why the sign <> (it means differs right?) and should i type 1/1/1900 or should I type the cell (line, column) where is located?

    many thanks

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Convert a multiple year list of 365 days/year into an equivalent of 360 days/year

    <> means does not equal
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1