Welcome to the Smartsheet Forum Archives
The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, pleaseVisit the Current Forums.
Help: Using =IF and Replace
Hello All,
I need help making a formula that will replace a cell with Static Information with a pre-assigned phrase when the information present in a row's range (IE [Room Assignment]22:[Room Assignment]50) matches cell's information.
I'm lost on how to make this happen, and hope the solution is simple.
I have a limited availabilitie of rooms, and I have 4 financial liaison(s). The rooms are listed above form entries so all managers can see rooms with special conditions.
Any help would be very appreciated thank you so much.
R
Nickelas
Comments
-
Greg Gates ✭✭✭✭✭
If I understand your situation correctly, you should definitely be able to do this!
In the space on the left side of your sheet where you have the lists of rooms, I would replace each one with a formula that checks for the existence of the relevant dropdown option in your room assignment column. That's as clear as mud, so let me give an example
In the cell that currently just says "SM L1" I would replace it with something like this formula:
=IF(COUNTIF([Room Assignment]22:[Room Assignment]50, "SM L1 - Bearadise king + queen bunks") > 0, "SM L1 - Sold", "SM L1")
Basically, this formula checks your Room Assignment column for the exact wording provided. If there's at least one cell that has that dropdown value, it will set the cell to "SM L1 - Sold." Otherwise, it will leave the text as "SM L1." Use a similar formula for every other room you have available.
That formula assumes that there's only one dropdown option per room in your list. If that isn't the case though, you could modify slightly and use the COUNTIFS formula instead to check for multiple dropdown options.
I hope that helps! Let me know if it doesn't solve your issue.
-
God Bless, OMG you solved it! Man your awesome.
R
Nickelas
Categories
Instead of comparing to the count of children, you would compare to the count of children that are blank or not blank.<\/p>
<\/p>
Change<\/p>
COUNT(CHILDREN())<\/p>
to<\/p>
COUNTIFS(CHILDREN(), OR(@cell <> \"\", @cell = \"\"))<\/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":106335,"type":"question","name":"Match Learner by Location in a Training Tracker for Metric Sheet","excerpt":"I am missing something, but I think it is because I am not accustom to working with dates. I am creating a metric sheet for dashboard. I have a training tracker that populates a date by a learners name & demographics (row) with columns of different courses (date columns). I didn't think the formula would be difficult , but…","categoryID":322,"dateInserted":"2023-06-12T19:39:08+00:00","dateUpdated":null,"dateLastComment":"2023-06-12T20:03:20+00:00","insertUserID":150616,"insertUser":{"userID":150616,"name":"benlight","url":"https:\/\/community.smartsheet.com\/profile\/benlight","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-12T20:23:28+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"updateUserID":null,"lastUserID":150616,"lastUser":{"userID":150616,"name":"benlight","url":"https:\/\/community.smartsheet.com\/profile\/benlight","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-12T20:23:28+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":32,"score":null,"hot":3373200148,"url":"https:\/\/community.smartsheet.com\/discussion\/106335\/match-learner-by-location-in-a-training-tracker-for-metric-sheet","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106335\/match-learner-by-location-in-a-training-tracker-for-metric-sheet","format":"Rich","lastPost":{"discussionID":106335,"commentID":380182,"name":"Re: Match Learner by Location in a Training Tracker for Metric Sheet","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/380182#Comment_380182","dateInserted":"2023-06-12T20:03:20+00:00","insertUserID":150616,"insertUser":{"userID":150616,"name":"benlight","url":"https:\/\/community.smartsheet.com\/profile\/benlight","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-12T20:23:28+00:00","banned":0,"punished":0,"private":false,"label":"✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-12T20:23:36+00:00","dateAnswered":"2023-06-12T19:52:03+00:00","acceptedAnswers":[{"commentID":380176,"body":"
=COUNTIFS({Learner Location Range}, [Location]@row, {Course Completion Date}, ISDATE(@cell))<\/p>
If I understand your scenario correctly, this may work.<\/p>"},{"commentID":380182,"body":"
Awesome, <\/p>
Exactly it! I was not identifying the date@cell. <\/p>
Thank you so very much!<\/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":[]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&siteSectionID=0&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 Posts","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">