Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

Formula Assistance πŸ™

I have the following data set:

Wellness Annual Total

Wellness Expense

Wellness Remaining

Education Annual Total

Education Expense

Education Remaining

$1,000

$500

$500

$5,000

$4,500

$500

I am trying to write a formula for the wellness remaining column, but I have a rule I must follow that is giving me a headache for the formula. Individuals are allowed $1,000 per year for wellness and $5,000 per year for education. However, wellness deducts from education….so if someone spends $4,500 on education then they only have $500 left for either wellness or education but not both.

Is there a formula I can write that will accurately reflect this? please let me know if more information is needed.

Tags:

Best Answers

  • Community Champion
    Answer βœ“

    Hello @JackofAll

    Something like this perhaps?

    =IF([Education Expense]@row <= 5000,
    MAX(0, 1000 - [Wellness Expense]@row - MAX(0, [Education Expense]@row - 4500)),
    0)

    https://www.linkedin.com/in/zchrispalmer/

  • Community Champion
    Answer βœ“

    Explanation:
    [Education Expense]@row <= 5000: Checks if education expenses are within the allowed limit.
    MAX(0, [Education Expense]@row - 4500): Calculates how much of the education budget is affecting the wellness budget. If education spending exceeds $4,500, it deducts the excess from the wellness budget.
    MAX(0, 1000 - [Wellness Expense]@row - ...): Ensures the remaining wellness budget doesn't go below zero.

    https://www.linkedin.com/in/zchrispalmer/

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions