Pull multiple IF THEN statements from data sheet?
I have a data sheet with 4 Columns that I'd like to pull into a second. In this simplified example, the Data sheet shows phase, activities which repeat for each phase and a date. I also have a column with "Yes/No" if I need the date in the Smartsheet.
What formula do I use to get the data to my second layout? I'd like it to run "If row equals "Deliver Material" and "Phase 1" and "Y" --> then put in the date (highlighted yellow). TIA
Best Answer
-
Hi,
Try the below formula:
=IFERROR(INDEX(COLLECT({Select "Date" range column from data sheet}, {Select "Phase" range column from data sheet}, Phase@row, {Select "Activity" range column from data sheet}, "Deliver Material", {Select "run" range column from data sheet}, "Y"), 1), "")
For the other columns, copy the same formula and change the activity name (like below).
=IFERROR(INDEX(COLLECT({Select "Date" range column from data sheet}, {Select "Phase" range column from data sheet}, Phase@row, {Select "Activity" range column from data sheet}, "Install Material", {Select "run" range column from data sheet}, "Y"), 1), "")
Thank you,
Answers
-
Hi,
Try the below formula:
=IFERROR(INDEX(COLLECT({Select "Date" range column from data sheet}, {Select "Phase" range column from data sheet}, Phase@row, {Select "Activity" range column from data sheet}, "Deliver Material", {Select "run" range column from data sheet}, "Y"), 1), "")
For the other columns, copy the same formula and change the activity name (like below).
=IFERROR(INDEX(COLLECT({Select "Date" range column from data sheet}, {Select "Phase" range column from data sheet}, Phase@row, {Select "Activity" range column from data sheet}, "Install Material", {Select "run" range column from data sheet}, "Y"), 1), "")
Thank you,
-
@Shanky Paul - THANK YOU! My kids suck all my brain energy out and I could not have done this without your response.
I actually have 16 columns and multiple rows in my sheet, so I did a little tweaking so I could copy/paste the formula throughout the document.
- Added a "ghost" row on the spreadsheet in Row 1 that repeats the Activity Name. (i.e. "Deliver Material" "Install Material")
- Added Absolute cell references on my row and column.
=IFERROR(INDEX(COLLECT({SMARTSHEET DATA Range 3}, {SMARTSHEET DATA Range 1}, $Phase@row, {SMARTSHEET DATA Range 2}, [Install Materials]$1), 1), "N/A")
Range 3 = Date; Range 1 = Phase; Range 2 = Activity
*I didn’t end up needing the “Run” criteria since it was matching based on the phase and activity*
Again, thank you thank you thank you!
-
@CB162023 Glad it helped! Have a nice day!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.7K Get Help
- 405 Global Discussions
- 216 Industry Talk
- 456 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!