+ Reply to Thread
Results 1 to 3 of 3

Date Not calculating correctly

Hybrid View

vbehler Date Not calculating correctly 04-18-2007, 12:48 AM
VBA Noob try =DATEDIF(G6,NOW(),"y")... 04-18-2007, 02:25 AM
daddylonglegs If you mean you want the age... 04-18-2007, 05:01 PM
  1. #1
    Registered User
    Join Date
    03-19-2007
    Posts
    16

    Exclamation Date Not calculating correctly

    I am using the following command and it isnt working the way i would like it


    =DATEDIF(G6,NOW(),"y") & " years, " & DATEDIF(G10,NOW(),"ym") & " months, " & DATEDIF(G10,NOW(),"md") & " days"

    what i want is for it to give me an age for the start of this year and no further

    if anyone can assist it would be greatly appreciated

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    try

    =DATEDIF(G6,NOW(),"y") & " years

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,723
    Quote Originally Posted by vbehler
    what i want is for it to give me an age for the start of this year and no further
    If you mean you want the age as at 1st January then replace NOW() with DATE(YEAR(TODAY()),1,1)

+ 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