Cross reference match formula

I am looking to cross reference Sheet A to pull in Time slots from Sheet B.
Criteria I need to have matching from Sheet A to pull from Sheet B to determine the slot number or multiple numbers.
- Start Time
- End Time
There could be multiple Slot Numbers so it would need to be a multi option that I could use later to separate in a report (time slots available).
Sheet A: Need Slot Numbers
Sheet B:
Best Answer
-
Hi @AngB789
I hope I understand your needs correctly. It sounds like you want to match the Start and End times in Sheet A with the corresponding time slots in Sheet B and pull multiple Slot Numbers into a single cell or a multi-select dropdown format.
To make this comparison more manageable, I added helper columns
[S]
and[E]
to convert the Start Time and End Time into numerical values. This allows for easier filtering of the relevant slots.[Slot Number] =JOIN(COLLECT({Sheet B: Time Slots : Slot Number}, {Sheet B: Time Slots : S}, >=S@row, {Sheet B: Time Slots : E}, <=E@row), CHAR(10))
[S] =VALUE(LEFT(TIME([Start Time]@row, 1), 2)) + VALUE(RIGHT(TIME([Start Time]@row, 1), 2)) / 60
[E] =VALUE(LEFT(TIME([End Time]@row, 1), 2)) + VALUE(RIGHT(TIME([End Time]@row, 1), 2)) / 60To simplify time-based comparisons, we can use the
TIME("hh:mm AM/PM",1)
function, which converts times into a 24-hour format as a numerical value.EXAMPLE: TIME("1:30 PM",1) → 13.50
Answers
-
Hi @AngB789
I hope I understand your needs correctly. It sounds like you want to match the Start and End times in Sheet A with the corresponding time slots in Sheet B and pull multiple Slot Numbers into a single cell or a multi-select dropdown format.
To make this comparison more manageable, I added helper columns
[S]
and[E]
to convert the Start Time and End Time into numerical values. This allows for easier filtering of the relevant slots.[Slot Number] =JOIN(COLLECT({Sheet B: Time Slots : Slot Number}, {Sheet B: Time Slots : S}, >=S@row, {Sheet B: Time Slots : E}, <=E@row), CHAR(10))
[S] =VALUE(LEFT(TIME([Start Time]@row, 1), 2)) + VALUE(RIGHT(TIME([Start Time]@row, 1), 2)) / 60
[E] =VALUE(LEFT(TIME([End Time]@row, 1), 2)) + VALUE(RIGHT(TIME([End Time]@row, 1), 2)) / 60To simplify time-based comparisons, we can use the
TIME("hh:mm AM/PM",1)
function, which converts times into a 24-hour format as a numerical value.EXAMPLE: TIME("1:30 PM",1) → 13.50
-
@jmyzk_cloudsmart_jp that was very helpful!
-
Happy to help!😁
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.1K Get Help
- 442 Global Discussions
- 154 Industry Talk
- 503 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 80 Community Job Board
- 512 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!