Nested IF Formula
Hi All, I'm trying to create a shift overview for an upcoming project, and would like to be able to enter a Start Time and End Time into 2x cells, and for the formula to fill in "1" into the corresponding cells to create a calendar view. Example below (just 1s filled in until I know what the formula is!!). I've tried multiple IF / IF(AND) functions to no luck. Anyone want to have a go at figuring out this formula please?
Answers
-
First, create a helper column for the start and end time. They can be hidden after creating. Use this formula:
=VALUE(SUBSTITUTE([START TIME]@row, ":00", ""))
=VALUE(SUBSTITUTE([END TIME]@row, ":00", ""))
For hour 8 you'll want this formula:
=IF(AND([Start Time (helper)]@row <= 8, [End Time (helper)]@row >= 9), 1, "")
For hour 9 you'll want this formula:
=IF(AND([Start Time (helper)]@row <= 9, [End Time (helper)]@row >= 10), 1, "")
And so on...
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.3K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 85 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 302 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!