Index Collect with If Statement
Can you please help me write a formula where I am doing an Index Collect from another sheet with an If statement. Maybe this will help explain...
This is my current formula: =INDEX(COLLECT({PM Weekly Allocation Week hours}, {PM Weekly Allocation Project Name}, [Project Name]@row), 1)
This works fine, but I want to collect the hours IF the date in the column "Weekly Date Start" in the sheet "PM Weekly Allocation" is a specific date I specify. So for example, If I want to collect the hours reported on 04/24/23, how would I write the formula?
Also, how do I add to the formula if I want to add another match? For Example, in addition to the Project name matching, the assigned Project Manager also match.
Thank you
Becky
Answers
-
Hi Becky,
You can add the If statement before the index/collect. So your formula would be =IF(HAS(Range of the column that has Weekly Date Start, "04/24/23"), INDEX(Collect({PM Weekly Allocation Week hours}, {PM Weekly Allocation Project Name}, [Project Name]@row), 1)). This will collect the total time clocked against 04/23/23 as a date in the sheet.
Thanks,
Aravind GP| Principal Consultant
Atturra Data & Integration
M: +61493337445
E:Aravind.GP@atturra.com
W: www.atturra.com
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.3K Get Help
- 364 Global Discussions
- 199 Industry Talk
- 428 Announcements
- 4.4K Ideas & Feature Requests
- 136 Brandfolder
- 127 Just for fun
- 128 Community Job Board
- 445 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!