Returning value based on date in another column
![Sam Swain](https://us.v-cdn.net/6031209/uploads/defaultavatar/nWRMFRX6I99I6.jpg)
Sam Swain
✭✭✭✭
Looking for a solution / formula type on the following:
- I want the Actual Phase Number column to give a number between 1 and 8.
- The number it will give is calculated by first looking at the Actual DOC column. The date in row 1 showing 12/13/22 will look at Scheduled DOC and find the most recent date before. In this case, the most recent date before 12/13/22 is 12/02/22.
- The Phase Number column for 12/02/22 shows '7'
- I therefore want row 1 of the Actual Phase Number row to return '7'
Tags:
Best Answer
-
You would need to use something like this:
=INDEX([Phase Number]:[Phase Number], MATCH(MAX(COLLECT([Scheduled DOC]:[Scheduled DOC], [Scheduled DOC]:[Scheduled DOC], @cell<= [Actual DOC]@row)), [Scheduled DOC]:[Scheduled DOC], 0))
Answers
-
You would need to use something like this:
=INDEX([Phase Number]:[Phase Number], MATCH(MAX(COLLECT([Scheduled DOC]:[Scheduled DOC], [Scheduled DOC]:[Scheduled DOC], @cell<= [Actual DOC]@row)), [Scheduled DOC]:[Scheduled DOC], 0))
-
That worked thanks Paul!!!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.2K Get Help
- 431 Global Discussions
- 152 Industry Talk
- 490 Announcements
- 5.2K Ideas & Feature Requests
- 85 Brandfolder
- 155 Just for fun
- 74 Community Job Board
- 501 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 306 Events
- 36 Webinars
- 7.3K Forum Archives
Want to practice working with formulas directly in Smartsheet?
Check out the Formula Handbook template!
Check out the Formula Handbook template!