Help with IFERROR addition to IF formula.

Options

I've set up an IF statement to generate the quarter based off the month for our fiscal year. I want to add an IFERROR to the formula so suppress errors in cells that do not have a Purchase Date.

Any advice is greatly appreciated!

=IF(MONTH([Purchase Date]@row) = 1, "Q4", IF(MONTH([Purchase Date]@row) = 2, "Q1", IF(MONTH([Purchase Date]@row) = 3, "Q1", IF(MONTH([Purchase Date]@row) = 4, "Q1", IF(MONTH([Purchase Date]@row) = 5, "Q2", IF(MONTH([Purchase Date]@row) = 6, "Q2", IF(MONTH([Purchase Date]@row) = 7, "Q2", IF(MONTH([Purchase Date]@row) = 8, "Q3", IF(MONTH([Purchase Date]@row) = 9, "Q3", IF(MONTH([Purchase Date]@row) = 10, "Q3", IF(MONTH([Purchase Date]@row) = 11, "Q4", IF(MONTH([Purchase Date]@row) = 12, "Q4", ""))))))))))))

Best Answer

  • Coen
    Coen ✭✭✭✭
    Answer ✓
    Options

    I figured it out!

    What I did instead of adding an IFERROR to the formula was to add =IF[Purchase Date]@row = "", "", to the formula. Now my formula looks like:


    =IF([Purchase Date]@row = "", "", IF(MONTH([Purchase Date]@row) = 1, "Q4", IF(MONTH([Purchase Date]@row) = 2, "Q1", IF(MONTH([Purchase Date]@row) = 3, "Q1", IF(MONTH([Purchase Date]@row) = 4, "Q1", IF(MONTH([Purchase Date]@row) = 5, "Q2", IF(MONTH([Purchase Date]@row) = 6, "Q2", IF(MONTH([Purchase Date]@row) = 7, "Q2", IF(MONTH([Purchase Date]@row) = 8, "Q3", IF(MONTH([Purchase Date]@row) = 9, "Q3", IF(MONTH([Purchase Date]@row) = 10, "Q3", IF(MONTH([Purchase Date]@row) = 11, "Q4", IF(MONTH([Purchase Date]@row) = 12, "Q4", "")))))))))))))

Answers

  • Kaveri Vipat
    Kaveri Vipat ✭✭✭✭✭✭
    Options

    Hi Coen 

    You can try this, I have added IFERROR in your formula. 

    =IFERROR(IF(MONTH([Purchase Date]@row) = 1, "Q4", IF(MONTH([Purchase Date]@row) = 2, "Q1", IF(MONTH([Purchase Date]@row) = 3, "Q1", IF(MONTH([Purchase Date]@row) = 4, "Q1", IF(MONTH([Purchase Date]@row) = 5, "Q2", IF(MONTH([Purchase Date]@row) = 6, "Q2", IF(MONTH([Purchase Date]@row) = 7, "Q2", IF(MONTH([Purchase Date]@row) = 8, "Q3", IF(MONTH([Purchase Date]@row) = 9, "Q3", IF(MONTH([Purchase Date]@row) = 10, "Q3", IF(MONTH([Purchase Date]@row) = 11, "Q4", IF(MONTH([Purchase Date]@row) = 12, "Q4", "")))))))))))),””) 

     I hope this works for you

    Have a Good Day! 

    Thanks,  

    Thanks,

    Kaveri Vipat

    Senior Associate - Smartsheet Development, Ignatiuz Software

    2023 Core Product Certified

    Did this answer help you? Show some love by marking this answer as "Insightful💡" or "Awesome❤️" and "Vote Up⬆️"

  • Coen
    Coen ✭✭✭✭
    Options

    Thank you!

    Unfortunately, I am still getting an unparseable error. :(


    I appreciate the help!

  • Coen
    Coen ✭✭✭✭
    Answer ✓
    Options

    I figured it out!

    What I did instead of adding an IFERROR to the formula was to add =IF[Purchase Date]@row = "", "", to the formula. Now my formula looks like:


    =IF([Purchase Date]@row = "", "", IF(MONTH([Purchase Date]@row) = 1, "Q4", IF(MONTH([Purchase Date]@row) = 2, "Q1", IF(MONTH([Purchase Date]@row) = 3, "Q1", IF(MONTH([Purchase Date]@row) = 4, "Q1", IF(MONTH([Purchase Date]@row) = 5, "Q2", IF(MONTH([Purchase Date]@row) = 6, "Q2", IF(MONTH([Purchase Date]@row) = 7, "Q2", IF(MONTH([Purchase Date]@row) = 8, "Q3", IF(MONTH([Purchase Date]@row) = 9, "Q3", IF(MONTH([Purchase Date]@row) = 10, "Q3", IF(MONTH([Purchase Date]@row) = 11, "Q4", IF(MONTH([Purchase Date]@row) = 12, "Q4", "")))))))))))))

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!