"IF" formula for Pass or Fail column

Options

Hi,

I'm making a quiz and want the Pass? column to say Pass or Fail if the Grade column is equal to or greater than 3. It keeps coming back as unparsable. Can I get some assistance with the formula?

Formula: =IF(Grade@row>=3,Pass,Fail)

Thanks,


David

Best Answer

  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭
    Answer ✓
    Options

    @David Soto

    You're almost there, you just need to add spaces around your operators and after your commas, and quotes around your text:

    =IF(Grade@row >= 3, "Pass", "Fail")

    You'll want to also make sure that your Grade@row value is a number value and not text value of a number. There's a difference between 3 and '3. So however you are calculating your grade, make sure it's a number or this formula will throw an error like #INVALID DATA TYPE. *


    *If you get this error, try wrapping your reference to Grade@row in a VALUE function to change the text value back to a number value:

    =IF(VALUE(Grade@row) >= 3, "Pass", "Fail")

    Regards,

    Jeff Reisman

    Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages

    If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

Answers

  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭
    Answer ✓
    Options

    @David Soto

    You're almost there, you just need to add spaces around your operators and after your commas, and quotes around your text:

    =IF(Grade@row >= 3, "Pass", "Fail")

    You'll want to also make sure that your Grade@row value is a number value and not text value of a number. There's a difference between 3 and '3. So however you are calculating your grade, make sure it's a number or this formula will throw an error like #INVALID DATA TYPE. *


    *If you get this error, try wrapping your reference to Grade@row in a VALUE function to change the text value back to a number value:

    =IF(VALUE(Grade@row) >= 3, "Pass", "Fail")

    Regards,

    Jeff Reisman

    Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages

    If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!