Lord Help Me!

Would appreciate some help with a formula!

I ultimately need a column that either shows a count based on the difference between two dates, or a "0."

In one column, we indicate whether a job post is open. "Yes" it's open, "No" it's closed. In another column, we show the date the job was posted. Inanothercolumn, we show the date an offer was made to a candidate.

I need a fourth column (called "TF") that, if there is a date in the offer column, we show the count based on the time that has passed since the job was posted and an offer was made. If there isnodate in the offer column, then we show the count between when the job was posted andtoday'sdate. Finally, if the job is no longer posted ("No") and there isno datein the offer column, the count changes to "0."

I feel like I am so close, yet so far away.

COLUMN TITLES

  • Column indicating the job is posted:
  • Column indicating date job was opened:
  • Column indicating date an offer was made: OFR
  • Column showing count or "0": "TF"
I'm using the formula below, which satisfies the count between the date the job was posted and when an offer was made (or today's date if no offer date):

=IF([ OFR]@row <> "", [ OFR]@row, TODAY()) - @row

I just need to now add a way to show "0" if the job isclosedANDno offer was made.

Again, I appreciate any help!

TU.jpg


Tags:
«1

Answers

  • Cory Page
    Cory Page ✭✭✭✭✭

    You should be able to add another if in front of the first if and say if

    if(column X = Closed then "0",IF([ OFR]@row <> "", [ OFR]@row, TODAY()) - @row))

    in the above example if the cell is marked as closed the if statement will simply end with a "0" if its not then it will proceed with the rest of the items you already have working. Maybe this will help, I can build a sheet and send proper screenshots and formulas if you need.

  • So if I use this formula, and "X = closed,"butthereisa date in the offer column, then it will still say the count and not "0"?

    THANK YOU, btw.

  • Cory Page
    Cory Page ✭✭✭✭✭

    Yea, because if the first If statement is satisfied the rest are ignored. I use this double if statement for overriding things all the time pretty useful for sure. If its not closed then the first statement is false and it moves on, you can always add another if if the first one is false.. nested if's I do believe they call it.

  • I'm trying this...

    =IF([]@row = "No", "0"), IF([ OFR]@row <> "", [ OFR]@row, TODAY()) - @row))

    ...and getting "column formula syntax" error.

    "" is the column that indicates whether the req is open or not. It's a Symbols type column, with the green, yellow, and red symbols (green circle, yellow triangle, red octagon.)

  • Cory Page
    Cory Page ✭✭✭✭✭
    edited 07/25/23

    Sorry about that Matt after digging in a bit more to your post and setting up the data it turned out to be a bit more iffy than I originally though.. Here you go take a look and let me know if I missed anything. Hope this helps.

    Update: Had some free time to clean up the example for you this should align a little better than my previous post.

    =IF(AND([Job is posted]@row = "No", [Offer was made]@row = ""), "0", IF([Offer was made]@row <> "", [Offer was made]@row - [Job was opened]@row, IF([Offer was made]@row = "", TODAY() - [Job was opened]@row)))

    image.png
    image.png


  • Cory, thank you again for the time you've already spent. I feel like we're almost there.

    This is how the formula look swith the column titles I have put in:

    =IF(AND([]@row = "No", [ OFR]@row = ""), "0", IF([ OFR]@row <> "", []@row - [ OFR]@row, IF([ OFR]@row = "", []@row - TODAY())))

    ss.PNG

    和it's returing #INVALID OPERATION

    Thank you again.

  • Cory Page
    Cory Page ✭✭✭✭✭

    @Matt_at_Lovesisn't []@row column a yes, no, hold.

    The below items would require a date to sum? Just curious

    []@row - [ OFR]@row

  • 我想我理解what you're asking. Yeah, that "" column is just a "yes" or "no," so there isn't a date to be subtracting from...

  • Matt_at_Loves
    edited 07/26/23

    Maybe the below screenshot is more helpful:

    ss3.PNG

    That highlighted one should be "0."

  • Cory Page
    Cory Page ✭✭✭✭✭

    @Matt_at_LovesI used the Job was opened date in the formula's above as it seemed like that was the column you wanted to use as the base date. if you change the yes no column in your formula to the Job opened that should fix it

    []@row - TODAY()

    []@row - [ OFR]@row

    • Change to: Column indicating date job was opened:

    If you change []@row in the two above lines to the job was opened: column that should help.

  • Cory, this is going to work. The only thing is that it changed all the day counts to negative. I'm sure this is an obvious fix, trying to figure it out now.

  • Cory Page
    Cory Page ✭✭✭✭✭

    @Matt_at_LovesYea, you can fix that by swapping the date - date 2 columns around.

    I noticed you swapped them wasn't sure if you preferred - values or not. Examples below.

    TODAY() -job was opened:

    [ OFR]@row - job was opened:

  • Cory! That's it. It's done. You did it:

    =IF(AND(@row = "No", [ OFR]@row = ""), "0", IF([ OFR]@row <> "", [ OFR]@row - @row, IF([ OFR]@row = "", TODAY() - @row)))

    Thank you SO much! Wish I could give you give you... SmartSheet GOLD or something!

    TY.jpg


  • Cory Page
    Cory Page ✭✭✭✭✭

    @Matt_at_LovesNo worries, I actually like these little challenges they are fun to work on so consider your payment giving me a fun little challenge to think about. I am running out of things to improve in my sheets had to start finding others to keep my skills growing. :)

  • Well again, I'm super appreciative, and I'm sure my team is as well! Maybe I'll have another one for you in the future!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out theFormula Handbook template!
Hi, <\/p>

Instead of applying the formula to \"Multiselect Text String\" row, did you tried with \"Multiselect Values\" row?<\/p>

=IF(HAS([Multiselect Values]@row, [Component ID]@row), \"MATCH\", \"NO MATCH\")<\/p>

Thank you,<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":109493,"type":"question","name":"I am having trouble using \"And\", \"OR\" & \"Countif(s)\" to build a formula.","excerpt":"Hello, I am attempting to come up with a sheet summary formula that counts cells if they meet at least one of 3 different statuses in the same column, AND also meet one of 5 different statuses in a separate column. So using the screenshot I've provided as an example (although it doesn't have 5 different statuses in the…","snippet":"Hello, I am attempting to come up with a sheet summary formula that counts cells if they meet at least one of 3 different statuses in the same column, AND also meet one of 5…","categoryID":322,"dateInserted":"2023-08-25T20:03:21+00:00","dateUpdated":null,"dateLastComment":"2023-08-26T00:34:49+00:00","insertUserID":165710,"insertUser":{"userID":165710,"name":"SmarsheetNewb","url":"https:\/\/community.smartsheet.com\/profile\/SmarsheetNewb","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-08-26T00:33:27+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":161714,"lastUser":{"userID":161714,"name":"Carson Penticuff","url":"https:\/\/community.smartsheet.com\/profile\/Carson%20Penticuff","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/B0Q390EZX8XK\/nBGT0U1689CN6.jpg","dateLastActive":"2023-08-27T02:16:35+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":26,"score":null,"hot":3386005690,"url":"https:\/\/community.smartsheet.com\/discussion\/109493\/i-am-having-trouble-using-and-or-countif-s-to-build-a-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/109493\/i-am-having-trouble-using-and-or-countif-s-to-build-a-formula","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":109493,"commentID":392692,"name":"Re: I am having trouble using \"And\", \"OR\" & \"Countif(s)\" to build a formula.","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/392692#Comment_392692","dateInserted":"2023-08-26T00:34:49+00:00","insertUserID":161714,"insertUser":{"userID":161714,"name":"Carson Penticuff","url":"https:\/\/community.smartsheet.com\/profile\/Carson%20Penticuff","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/B0Q390EZX8XK\/nBGT0U1689CN6.jpg","dateLastActive":"2023-08-27T02:16:35+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-26T00:33:25+00:00","dateAnswered":"2023-08-25T20:44:12+00:00","acceptedAnswers":[{"commentID":392662,"body":"

Try this:<\/p>

=COUNTIFS([Item Number]:[Item Number], OR(@cell = \"C001\", @cell = \"COO2\", @cell = \"COO3\", @cell = \"COO4\"), [Status]:[Status], OR(@cell = \"Green\", @cell = \"Yellow\", @cell = \"Red\"))<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":254,"urlcode":"formulas","name":"Formulas"}]},{"discussionID":109474,"type":"question","name":"Help with date calculation formula","excerpt":"Hello, I'm trying to find a formula that will help me calculate how long an intake took to resolve. The rows I need to be calculated are Date Reported & Resolution Date. If the resolution date is blank I want it to use the current date in the calculation to see how long this issue has gone unresolved. Any help is much…","snippet":"Hello, I'm trying to find a formula that will help me calculate how long an intake took to resolve. The rows I need to be calculated are Date Reported & Resolution Date. If the…","categoryID":322,"dateInserted":"2023-08-25T16:29:39+00:00","dateUpdated":"2023-08-25T16:29:59+00:00","dateLastComment":"2023-08-25T23:01:30+00:00","insertUserID":165688,"insertUser":{"userID":165688,"name":"Nwest","title":"Systems Analyst","url":"https:\/\/community.smartsheet.com\/profile\/Nwest","photoUrl":"https:\/\/aws.smartsheet.com\/storageProxy\/image\/images\/u!1!ukHVZ18ImX4!BcjWAe8S9SY!l7iQo_PZHOx","dateLastActive":"2023-08-25T17:22:30+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":165688,"lastUserID":8888,"lastUser":{"userID":8888,"name":"Andrée Starå","title":"Smartsheet Expert Consultant & Partner | Workflow Consultant \/ CEO @ WORK BOLD","url":"https:\/\/community.smartsheet.com\/profile\/Andr%C3%A9e%20Star%C3%A5","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/0PAU3GBYQLBT\/nXWM7QXGD6464.jpg","dateLastActive":"2023-08-26T17:06:33+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":3,"countViews":25,"score":null,"hot":3385987269,"url":"https:\/\/community.smartsheet.com\/discussion\/109474\/help-with-date-calculation-formula","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/109474\/help-with-date-calculation-formula","format":"Rich","tagIDs":[254],"lastPost":{"discussionID":109474,"commentID":392687,"name":"Re: Help with date calculation formula","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/392687#Comment_392687","dateInserted":"2023-08-25T23:01:30+00:00","insertUserID":8888,"insertUser":{"userID":8888,"name":"Andrée Starå","title":"Smartsheet Expert Consultant & Partner | Workflow Consultant \/ CEO @ WORK BOLD","url":"https:\/\/community.smartsheet.com\/profile\/Andr%C3%A9e%20Star%C3%A5","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/0PAU3GBYQLBT\/nXWM7QXGD6464.jpg","dateLastActive":"2023-08-26T17:06:33+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-08-25T17:04:22+00:00","dateAnswered":"2023-08-25T16:36:59+00:00","acceptedAnswers":[{"commentID":392622,"body":"

\n \n https:\/\/community.smartsheet.com\/discussion\/109474\/help-with-date-calculation-formula\n <\/a>\n<\/div>\n

Hi, <\/p>

I hope you're well and safe!<\/p>

Try something like this.<\/p>

=IF([Date Reported]@row <> \"//www.santa-greenland.com/community/discussion/108044/\", IF([Resolution Date]@row = \"//www.santa-greenland.com/community/discussion/108044/\", NETDAYS([Date Reported]@row, TODAY()), NETDAYS([Date Reported]@row, [Resolution Date]@row)))<\/p>

Did that work\/help? <\/p>

I hope that helps!<\/p>

Be safe, and have a fantastic weekend!<\/p>

Best,<\/p>

Andrée Starå<\/strong><\/a> | Workflow Consultant \/ CEO @ WORK BOLD<\/strong><\/a><\/p>

Did my post(s) help or answer your question or solve your problem? Please support the Community by <\/em>marking it Insightful\/Vote Up, Awesome, or\/and as the accepted answer<\/em><\/strong>. It will make it easier for others to find a solution or help to answer!<\/em><\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":254,"urlcode":"formulas","name":"Formulas"}]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&categoryID=322&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&sort=-hot&limit=3&expand%5B0%5D=all&expand%5B1%5D=-body&expand%5B2%5D=insertUser&expand%5B3%5D=lastUser&status=accepted","prevURL":null,"currentPage":1,"total":10000,"limit":3},"title":"Trending in Formulas and Functions ","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

Trending in Formulas and Functions