Share via

Nested IF( ) function formula help needed

Anonymous
2022-05-29T16:35:22+00:00

hi have been trying this on my design but the final result hasnt been as i expected

=IF( attenDance>minDays,

   SUM( verifiedOutPut - excessOutPut) \* standardPrice + 

         SUM( excessOutPut \* pricePerExcessClaim) + maximum\_TNT, 

            IF( attenDance<maxDays, 

         SUM( verifiedOutPut-excessOutPut)\*standardPrice+ 

  SUM( excessOutPut\*standardPrice)+minimum\_TNT/minDays\*attenDance, 

IF( attenDance<=0,0)))

per my evaluation the last part isnt given me the 0 i expect when the atttendance cell = 0.

thank you for reading

screen sample is below:

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

10 answers

Sort by: Most helpful
  1. Anonymous
    2022-05-29T18:03:43+00:00

    Hi JackAmin

    It is recommended to first evaluate the 0 (zeroes) and "Blank " output when dealing with IF statement/logical formulas.

    Please, try the formula below.

    =IF(attenDance<=0,0,IF(attenDance>minDays,

       SUM( verifiedOutPut - excessOutPut) \* standardPrice + 
    
             SUM( excessOutPut \* pricePerExcessClaim) + maximum\_TNT, 
    
                IF(attenDance&lt;maxDays, 
    
             SUM(verifiedOutPut-excessOutPut)\*standardPrice+ 
    
      SUM(excessOutPut\*standardPrice)+minimum\_TNT/minDays\*attenDance,0 
    

    )))

    Please, also notice that cell M10 is Custom formatted to show a dash " - " when the result is 0.

    I hope this helps you and gives a solution to your problem

    Do let me know if you need more help

    Regards

    Jeovany

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2022-05-29T17:23:57+00:00

    hi have been trying this on my design but the final result hasnt been as i expected

    =IF( attenDance>minDays,

    SUM( verifiedOutPut - excessOutPut) * standardPrice +

    SUM( excessOutPut * pricePerExcessClaim) + maximum_TNT,

    IF( attenDance<maxDays,

    SUM( verifiedOutPut-excessOutPut)*standardPrice+

    SUM( excessOutPut*standardPrice)+minimum_TNT/minDays*attenDance,

    IF( attenDance<=0,0)))

    per my evaluation the last part isnt given me the 0 i expect when the atttendance cell = 0.

    thank you for reading

    screen sample is below:

    Image

    =IF(attenDance>minDays,

       SUM( verifiedOutPut - excessOutPut) \* standardPrice + 
    
             SUM( excessOutPut \* pricePerExcessClaim) + maximum\_TNT, 
    
                IF(attenDance&gt;0, 
    
             SUM(verifiedOutPut-excessOutPut)\*standardPrice+ 
    
      SUM(excessOutPut\*standardPrice)+minimum\_TNT/minDays\*attenDance, 
    

    IF(attenDance<=0,0)))

    hi guys for some reason i edited the second IF condition and somehow the results i expected has been delivered.

    a sample below:

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2022-05-29T16:55:41+00:00

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2022-05-29T16:47:49+00:00

    Can you share a sample data of your workbook?

    aww, thank you i was just uploading an image when ur reply came in. will this be fine or i should share the book still

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2022-05-29T16:40:24+00:00

    Can you share a sample data of your workbook?

    Was this answer helpful?

    0 comments No comments