Excel Formula for Client Availability Sheet

Zee996

New Member
Joined
Nov 30, 2021
Messages
36
Office Version
  1. 365
Platform
  1. Windows
Hello Everyone,

I need help with an Excel formula.

I am currently working on a client availability sheet. Here is how the data is structured: dates are listed in columns and times are listed in rows. Also, I have placed 2.0 to indicate the client's available timeslot during that day. Here's how the data looks like and the output I need help with:
09:0010:0011:0012:0013:0014:0015:0016:0017:0018:0019:0020:0021:0022:00
01-May-24​
2.02.02.02.0
02-May-24​
2.02.02.02.02.02.0
03-May-24​
2.02.02.02.02.02.02.0
04-May-24​
2.02.02.02.02.02.02.0
05-May-24​
2.02.02.02.02.02.02.0
06-May-24​
2.02.02.02.02.02.02.0
07-May-24​
2.02.02.02.02.02.02.02.02.02.02.02.02.02.0
08-May-24​
2.02.02.02.02.02.02.02.02.02.0
09-May-24​
2.02.02.02.0
Required Output
Available time slot
Date drop down
01-May-24​
From 16:00 to 19:00
Similarly for other dates too
02-May-24​
From 16:00 to 21:00
03-May-24
From 09:00 to 15:00

I have created a formula that finds the available timeslot but, I only require the first and the last timeslot of that particular day.
This is the formula: =TEXTJOIN(" - ", TRUE, IF(INDEX($C$4:$P$33, MATCH(PN$22,$B$4:$B$33, 0), 0) = 1, TEXT($C$2:$P$2, "hh:mm AM/PM"), ""))
The output this formula giving me:
04:00 pm - 05:00 pm - 06:00 pm - 07:00 pm - 08:00 pm - 09:00 pm - 10:00 pm
$C$4:$P$33 - Data reference i.e. 2.0
PN$22 - Drop-down date
$B$4:$B$33 - Date reference
$C$2:$P$2 - Time reference

Is it possible to achieve this output?

Thank you.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
will you ever have time slots with unavailable gaps? Say 09:00-11:00 AM, and then 2:00 PM to 4:00 PM?
 
Upvote 0

Forum statistics

Threads
1,223,883
Messages
6,175,167
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top