IF/AND and cross-sheet reference
I'm trying to write an IF/AND statement that references a range of data in another Smartsheet but an #INVALID OPERATION message is returned.
- IF the user is requesting to use the Immersive Learning Center
- AND the user is requesting to schedule their event on a date when the Immersive Learning Center is closed (referencing list of dates in a separate Smartsheet)
- Return: Not a valid ILC Date, Otherwise Return: Date Okay
Here's my formula:
=IF(AND([Immersive Learning Center Request?]1 = "Yes", [Preferred Date BETWEEN 8/27/18-8/25/19 ONLY]1 = {ILC Closed Dates Range 1}), "Not a valid ILC Date", "Date Okay")
What am I missing? Thanks in advance!
Comments
-
Jim Hook ✭✭✭✭✭✭
Mary, I'm not 100% sure but I think the external reference part of your formula is trying to compare the content of one cell with an array of cells in the other sheet and that won't work. You might try the COUNTIFS() function using an external reference to see if there is a match on the other sheet that meets the conditions.
-
Mike Wilday ✭✭✭✭✭✭
Well... it looks like your trying to reference a range of dates in ILC Closed Dates Range. It looks like your reference might be messed up.
Try this...
=IF(AND([Immersive Learning Center Request?]1 = "Yes", [Preferred Date BETWEEN 8/27/18-8/25/19 ONLY]1 = [ILC Closed Dates Range]1), "Not a valid ILC Date", "Date Okay")
Does that work?
-
Mary Ayers ✭✭✭✭
Thanks Mike. Unfortunately, "#UNPARSEABLE" is returned. What if instead of referencing the range of dates that the ILC is closed via a different sheet, I include in the formula the list of dates.
I tried this but it also returned "#UNPARSEABLE" so am obviously doing something wrong -- but might be easier to resolve than the cross sheet reference:
=IF(AND([Immersive Learning Center Request?]1 = "Yes", [Preferred Date BETWEEN 8/27/18-8/25/19 ONLY]1 = "09/01/18", "09/15/18", "10/01/18"), "Not a valid ILC Date", "Date Okay")
-
Mike Wilday ✭✭✭✭✭✭
=IF(AND([Immersive Learning Center Request?]1 = "Yes", [Preferred Date BETWEEN 8/27/18-8/25/19 ONLY]1 = "09/01/18", "09/15/18", "10/01/18"), "Not a valid ILC Date", "Date Okay")
In that instance, you have to use an OR statement...
=IF(AND([Immersive Learning Center Request?]1 = "Yes", OR([Preferred Date BETWEEN 8/27/18-8/25/19 ONLY]1 = "09/01/18", [Preferred Date BETWEEN 8/27/18-8/25/19 ONLY]1= "09/15/18", [Preferred Date BETWEEN 8/27/18-8/25/19 ONLY]1 = "10/01/18"), "Not a valid ILC Date", "Date Okay")
Does that work?
-
Mary Ayers ✭✭✭✭
Now the message is #INCORRECT ARGUMENT
Once I added a second closing to paren to after the last date, it worked!!
Here's my final formula (I changed the name of the Preferred Date field to simplify things.
=IF(AND([Immersive Learning Center Request?]1 = "Yes", OR([Preferred Date]1 = "09/01/18", [Preferred Date]1 = "09/15/18", [Preferred Date]1 = "10/01/18")), "Not a valid ILC Date", "Date Okay")
Thanks so much!
Mary
Help Article Resources
Categories
Try setting the criteria to 0.5 instead of 50 as you have the column set to % - right now the formula may be looking for greater than 5000% which obviously won't be found if you're using 0-100%.<\/p>
Let us know if this works or if another solution is required.<\/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":219,"urlcode":"sheets","name":"Sheets"},{"tagID":254,"urlcode":"formulas","name":"Formulas"},{"tagID":265,"urlcode":"reports","name":"Reports"},{"tagID":335,"urlcode":"sheet-summary","name":"Sheet Summary"},{"tagID":472,"urlcode":"cell-linking","name":"Cell linking"}]},{"discussionID":111988,"type":"question","name":"IF AND Formula Question","excerpt":"I wanted get the below formula running... but get an an #UNPARSEABLE error. =IF AND(Number@row, {Wave B (EMEA) - L4 Mapping}, CONTAINS({Wave B (EMEA) - Country x2}, \"BE\"), \"True\", \"False\") Any help would be much appreciated.","snippet":"I wanted get the below formula running... but get an an #UNPARSEABLE error. =IF AND(Number@row, {Wave B (EMEA) - L4 Mapping}, CONTAINS({Wave B (EMEA) - Country x2}, \"BE\"), \"True\",…","categoryID":322,"dateInserted":"2023-10-20T21:18:29+00:00","dateUpdated":null,"dateLastComment":"2023-10-21T08:53:03+00:00","insertUserID":164249,"insertUser":{"userID":164249,"name":"Ulrich Anderhub 1","url":"https:\/\/community.smartsheet.com\/profile\/Ulrich%20Anderhub%201","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-10-21T12:48:10+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":164249,"lastUser":{"userID":164249,"name":"Ulrich Anderhub 1","url":"https:\/\/community.smartsheet.com\/profile\/Ulrich%20Anderhub%201","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-10-21T12:48:10+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":37,"score":null,"hot":3395716292,"url":"https:\/\/community.smartsheet.com\/discussion\/111988\/if-and-formula-question","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/111988\/if-and-formula-question","format":"Rich","lastPost":{"discussionID":111988,"commentID":401071,"name":"Re: IF AND Formula Question","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/401071#Comment_401071","dateInserted":"2023-10-21T08:53:03+00:00","insertUserID":164249,"insertUser":{"userID":164249,"name":"Ulrich Anderhub 1","url":"https:\/\/community.smartsheet.com\/profile\/Ulrich%20Anderhub%201","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-10-21T12:48:10+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-10-21T08:53:11+00:00","dateAnswered":"2023-10-20T21:36:57+00:00","acceptedAnswers":[{"commentID":401046,"body":"