+ Reply to Thread
Results 1 to 5 of 5

INT Formula Not Working Correctly

  1. #1
    Registered User
    Join Date
    08-20-2018
    Location
    Austin, Texas
    MS-Off Ver
    Window 10
    Posts
    3

    INT Formula Not Working Correctly

    New User,

    1. I am creating a Dashboard with average weeks and days. I am using this formula to calculate the average amount days. For Example, 145 days is shown in cell G9 as a result of the formula below:

    =IFERROR(AVERAGEIFS(Curt_T[DURATION(DAYS)],Curt_T[STAGE],"Adopted Technology",Curt_T[CLOSED],"CLOSED"),"")

    The I am using this formula to calculate amount of Weeks and Days left over.

    =INT((G9)/7)&" weeks"&IF(MOD(G9,7)=0,"",", "&MOD(G9,7)&" days")

    The formula is producing 20 weeks and 4.666666666666666 days. I need my formula to round down to 4 days. I am in Sales and I love excel but I am working with limited knowledge. This is my first time posting to a forum like this.

    Thanks in advance,

    CB
    Last edited by chrisbay2324; 08-20-2018 at 09:41 AM.

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: INT Formula Not Working Correctly

    Hello and welcome to the forum.

    The second MOD(G9,7) part is what you need to focus on. Try this:

    =ROUNDDOWN(MOD(G9,7),0)

    Including that in your formula will give you this:

    =INT(G9/7)&" weeks"&IF(MOD(G9,7)=0,"",", "&ROUNDDOWN(MOD(G9,7),0)&" days")

  3. #3
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: INT Formula Not Working Correctly

    i get 20 weeks and 5 days which is what it should be unless the 145 is not 145 and something like 144.66666

    if it is since you are familiar with the int function use it again
    =INT((G9)/7)&" weeks"&IF(MOD(G9,7)=0,"",", "&INT(MOD(G9,7))&" days")

  4. #4
    Registered User
    Join Date
    08-20-2018
    Location
    Austin, Texas
    MS-Off Ver
    Window 10
    Posts
    3

    Re: INT Formula Not Working Correctly

    Wow! Both of these INT formula solutions worked great. Thank you. I am truly blown away with how fast you both solved my INT formula issue. Nice work. I am greatful.

    Best,

    CB

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: INT Formula Not Working Correctly

    Glad we could help.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Why is this If Function not working correctly
    By trying-my-best in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-17-2017, 12:48 PM
  2. IF function not returning expected result
    By kapeller in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-21-2014, 10:12 AM
  3. [SOLVED] Using the Split function with another function incorporated is not working correctly
    By highlystrung in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-06-2013, 03:51 PM
  4. If function not working correctly
    By lsbeuk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-22-2011, 09:26 PM
  5. Excel 2007 : Count If function not working correctly
    By sir yes sir in forum Excel General
    Replies: 4
    Last Post: 02-10-2011, 04:23 AM
  6. [SOLVED] Lookup function still not working correctly
    By Mike K in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. Lookup function still not working correctly
    By Mike K in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

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