NETDAYS based on IF statement

Options
SD@HL
SD@HL ✭✭
edited 12/09/19 in Formulas and Functions

I'm trying to use a NETDAYS function to determine how many days overdue a payment is, but I only want to display that number of days if a column named 'Status' has the value 'Client payment pending'.

 

The function I'm trying to use is =NETDAYS([Date Sent to AP/CR]398, TODAY()) but I don't know how to work that into a conditional statement. I want this to output the netdays only if the Status column has the value "Client payment pending'.

 

Can anyone provide some help? Thanks in advance!

Comments

  • Mike Wilday
    Mike Wilday ✭✭✭✭✭✭
    edited 03/13/19
    Options

    Try this, 

    Edited: to include quotation mark after Pending!

    =IF(Status@row = "Client Payment Pending", NETDAYS([Date Sent to AP/CR]@row, TODAY()) ,"") 

    This will only run the netdays if you have a Client Payment pending status in the status column. Make sure that your status column is title status. If not, change the status@row to indicate the actual column [Your Column Name]@row

    @row will look at the current row and doesn't require direct reference to the row numbers! 

    https://help.smartsheet.com/articles/2476491-create-efficient-formulas-with-at-cell

  • SD@HL
    SD@HL ✭✭
    Options

    Thanks so much for the help! That solved my issue (and helped me with a few other things I had questions about as well!)

     

    Just an FYI for anyone using this in the future, there should also be a quotation mark (") after the word 'Pending' in order to avoid an error

  • Mike Wilday
    Mike Wilday ✭✭✭✭✭✭
    Options

    Awesome! Glad I could help. I edited the formula above to include the quotation mark after Pending! laugh I'm glad you caught that! 

  • SD@HL
    SD@HL ✭✭
    Options

    If I wanted to run this same function but have it triggered by multiple different values in the Status column ("Client payment pending" OR "Sent to AP/CR"), how should I modify the formula?

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!