Column Formula Help - Helper Checkbox for Shift Entries
Hello Community,
I am looking for some help with a helper column checkbox formula needed to support reporting of data to a dashboard and downstream formulas.
I have four shifts (A,B,C,D) entering data points into a sheet, with the potential for multiple line entries occurring per shift per day worked (see example below).
I need the most recent shift's entries and the previous shift's entries to be reported out to a dashboard and used in downstream formulas. To do this, I have created a checkbox helper column (Shift for Reporting) but I am struggling to find a formula that will check the most recent shift's lines, as well as the previous shifts lines and update when lines are entered. I am not sure if it is relevant (likely dependent upon the functions used), but sequencing of shift entries will include all of the following:
A follows B, B follows A, B follows C, C follows B, C follows D, D follows C, or D follows A.
Any help or suggested formulas are greatly appreciated as I have it a wall with this one. Thank you!
Answers
-
Hello @Brett B.
A possible solution is adding 2 helper columns:
- Row ID - auto-number column
- Most Recent Entry - text/number column
Then:
Step 1: Add most recent entry formula in the Most Recent Entry helper column
=MAX(COLLECT([Row ID]:[Row ID], [Shift Name]:[Shift Name], [Shift Name]@row))
Step 2: Add this formula on your checkbox column:
=IF(OR(MAX(COLLECT([Row ID]:[Row ID], [Shift Name]:[Shift Name], [Shift Name]@row)) = [Row ID]@row, MAX(COLLECT([Row ID]:[Row ID], [Row ID]:[Row ID], @cell < [Most Recent Entry]@row, [Shift Name]:[Shift Name], [Shift Name]@row)) = [Row ID]@row), 1, 0)
Melissa Yamada
melissa@insightfulsheets.com
Data made simple, spreadsheets reimagined
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 129 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!