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
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!