Share via

IFS

Anonymous
2017-07-14T05:52:10+00:00

Hi,

Wondering if there is a way to make =IFS read only the decimal numbers in a sequence, rather than rework the number. E.G I have 14.58 but only want to IFS to read .58 and not the 14 ?

Reason for this is - I want to run IFS with roundup to automatically increases the decimal place based on criteria. Criteria = if decimal place >.5 round up to .99 if <.5 round up to .49 etc. 

Thanks.

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Anonymous
    2017-07-14T12:19:03+00:00

    If you are only checking two conditions you don't need IFS.  You can just use IF

    if((A2-Trunc(A2))>.5,result, other result)

    This would check >.5 and <=.5

    if you want three conditions, then you could use IFS

    IFS((A2-Trunc(A2))>.5,Result,(A2-Trunc(A2))=.5,Result,(A2-Trunc(A2))<.5,Result)

    although doing an exact equality check on a floating point number might not give you the results you expect.

    --

    Regards,

    Tom Ogilvy

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2017-07-14T07:33:19+00:00

    Is it you are looking for. Formula at B2 is    =IF(MOD(A1,1)<0.5,INT(A1)+0.49,INT(A1)+0.99)   copy it down.

    Was this answer helpful?

    0 comments No comments
  5. Vijay A. Verma 104.9K Reputation points Volunteer Moderator
    2017-07-14T07:16:33+00:00

    You can put like below

    =IFS(A2>mod(B2,1), Result, A3>mod....

    Where B2 has the decimal number

    Was this answer helpful?

    0 comments No comments