Formula Assistance

Reklaw
Reklaw
edited 12/09/19 in Formulas and Functions

Hi All

A newbie to Smartsheets, so please bear with me.

I have a formula that works on excel but not on Smartsheets….any ideas why?

Excel: =IF(K44="Approved",SUM(F43-C44),IF(K44="Declined",F43))

Smartsheets: =if([Approver approval]43="Approved",sum([Days Remaining]42-[Annual Leave]43,if([Approver approval]43="Declined",[Days Remaining42)))

Thanks Kim

Smartsheets.PNG

Tags:

Comments

  • L_123
    L_123 ✭✭✭✭✭✭

    Your Formula:

    =if([Approver approval]43="Approved",sum([Days Remaining]42-[Annual Leave]43,if([Approver approval]43="Declined",[Days Remaining42)))

    your sum is not the correct reference. it is currently

    sum([Days Remaining]42-[Annual Leave]43

    it should be

    sum([Days Remaining]42:[Annual Leave]43)

    you have a minus instead of a colon and don't close out the sum. your end formula should be:

    =if([Approver approval]43="Approved",sum([Days Remaining]42:[Annual Leave]43),if([Approver approval]43="Declined",[Days Remaining]42

     

    *You also incorrectly referenced the days remaining 42 at the very end of your code. you missed your hard bracket.

  • L_123
    L_123 ✭✭✭✭✭✭

    Got cloudflared on the edit. Anyways I took a look back at your picture you posted and I made a mistake on the sum. you don't need the sum formula, that is for a range, you just want to add two cells together then just add them.

     

    =if([Approver approval]43="Approved",[Days Remaining]42+[Annual Leave]43,if([Approver approval]43="Declined",[Days Remaining]42

  • Reklaw
    Reklaw
    edited 11/06/19

     



    L@123

    Thank you so much.  Worked a treat

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!