+ Reply to Thread
Results 1 to 9 of 9

Help with formula

Hybrid View

Ltat42a Help with formula 11-05-2006, 06:10 PM
VBA Noob Hi, Try ... 11-05-2006, 06:14 PM
Ltat42a WOW!!! That works good -... 11-05-2006, 06:18 PM
VBA Noob Glad it worked for you VBA... 11-05-2006, 06:21 PM
Ltat42a Question....is there a way... 11-05-2006, 06:31 PM
VBA Noob Hi, Try ... 11-05-2006, 06:39 PM
Ltat42a No...that didn't work, cell... 11-05-2006, 07:12 PM
  1. #1
    Forum Contributor
    Join Date
    06-29-2005
    Location
    TN
    MS-Off Ver
    Microsoft 365
    Posts
    327

    Help with formula

    Hi All,
    I'm using this formula to calculate the number of years on the job -
    =IF(I6<>"",DATEDIF(I6,TODAY(),"m")/12,"")

    It works real well. I have a new project to work on using the sum
    of this formula. I need this formula to round down the sum.
    If I format the cell to whole numbers, it's rounding the number
    up or down depending on the sum.

    If the sum = 21.92 - the format is rounding the number up to 22 and
    it's throwing off my new project. I need it to round the number down to a whole number (21).

    Any suggestions??

    Ltat42a

  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
    Hi,

    Try

    =IF(I6<>"",INT(DATEDIF(I6,TODAY(),"m")/12),"")

    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 Contributor
    Join Date
    06-29-2005
    Location
    TN
    MS-Off Ver
    Microsoft 365
    Posts
    327
    WOW!!! That works good - Thanx!!

    Lt

  4. #4
    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
    Glad it worked for you

    VBA Noob

  5. #5
    Forum Contributor
    Join Date
    06-29-2005
    Location
    TN
    MS-Off Ver
    Microsoft 365
    Posts
    327
    Quote Originally Posted by VBA Noob
    Hi,

    Try

    =IF(I6<>"",INT(DATEDIF(I6,TODAY(),"m")/12),"")

    VBA Noob
    Question....is there a way that the cell can show "0".
    For instance...a person who is promoted 06/01/2006, the results of this cell
    should show zero instead of blank. On 06/01/2007 - it will read 1.

    Is that possible?

  6. #6
    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
    Hi,

    Try

    =IF(I6="","",IF(INT(DATEDIF(I6,TODAY(),"m")/12)=0,"",INT(DATEDIF(I6,TODAY(),"m")/12)))

    VBA Noob

  7. #7
    Forum Contributor
    Join Date
    06-29-2005
    Location
    TN
    MS-Off Ver
    Microsoft 365
    Posts
    327
    No...that didn't work, cell still shows blank (Excel 2003).

    That's ok....gonna use conditional formatting to highlight that cell
    in the case where the promotion date is entered.

    Thanx for the help.

    Lt

  8. #8
    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
    Sorry,

    Should of being

    =IF(I6="","",IF(INT(DATEDIF(I6,TODAY(),"m")/12)=0,"0",INT(DATEDIF(I6,TODAY(),"m")/12)))

    VBA Noob

+ 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