Can anyone spot what is wring with this formula?
=IFERROR(IF(ISBLANK([C1D1 Date]@row ) = 0, IF(ISBLANK(INDEX(COLLECT({Patient ID}, {Visit Collection Date}, [C1D1 Date]@row , {Sample Name}, "PK PRE PRI", 1)) = 0, "Received")), "Not Received"))
Answers
-
There are a few things that I noticed:
—There's an issue with the =0 s. As I understand it, ISBLANK wouldn't be paired with an = . ISBLANK(whatever) should evaluate to TRUE or FALSE. So ISBLANK(whatever)=0 seems to be a syntax error at first glance.
—Wrapping everything in IFERROR should result in only one close-parenthesis at the end of your formula; I see two. So without specifically mapping out each clause, it looks like there's an issue with the placement of parentheses. Parentheses really trips me up - especially when there's a reference to another sheet in there. I suggest this little trick to make writing your formula a little easier. Create a few columns to accommodate each component of your formula, and then just break it down:
=ISBLANK([C1D1 Date]@row)
=INDEX(COLLECT({Patient ID}, {Visit Collection Date}, [C1D1 Date]@row, {Sample Name},…. (I'm not sure what you're trying to accomplish here, but write that base formula JUST to return what you're after
SIMPLE formula: =IF(OR(ColumnA=True,ColumnB=whateveryouwantreturned),"Received","Not Received")
Verify that this all works. When you are satisfied that the components of the formula work, ColumnA in your final formula with the entire formula IN ColumnA with the exception of the = at the beginning. Verify that the formula STILL works, then replace ColumnB in that same formula with the entire formula IN ColumnB with the exception of the = at the beginning. Verify it still works… that's your formula. 😀 Now that you have your formula, put it in the place you want it on your sheet, and delete all those temp columns.Good luck!
If this answer resolves your question, please help the Community by marking it as an accepted answer. I'd also be grateful for your response - "Insightful"or "Awesome" reactions are much appreciated. Thanks!
Help Article Resources
Categories
Check out the Formula Handbook template!