Sick leave periods

Iceman77

New Member
Joined
Mar 14, 2023
Messages
2
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Hello everyone
I want to find and have it in one cell the periods that a person used sick leave (for record purpose) in the month (see example below). I've tried to find something online, but haven't succeed.
By the way, still using excel 2010 😢.

For example:
A1 to AE1 are dates from Jan 1 to Jan 31
Cells D2, E2, F2, N2, O2, P2, Q2, W2, X2, Y2 and Z2 has letter S, which indicates the day person was on sick leave.
I need in cell AF2 to have the following
Jan 4-Jan 6, Jan 14-Jan17, Jan 23-Jan 26.

Thanks a lot.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi &
Welcome to Mr Excel!

If you are happy to have list in different rows rather than just AF2

Try

Book3
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG
11/1/20231/2/20231/3/20231/4/20231/5/20231/6/20231/7/20231/8/20231/9/20231/10/20231/11/20231/12/20231/13/20231/14/20231/15/20231/16/20231/17/20231/18/20231/19/20231/20/20231/21/20231/22/20231/23/20231/24/20231/25/20231/26/20231/27/20231/28/20231/29/20231/30/20231/31/2023
2SSSSSSSSSSS1/4/2023
31/5/2023
41/6/2023
51/14/2023
61/15/2023
71/16/2023
81/17/2023
91/23/2023
101/24/2023
111/25/2023
121/26/2023
13 
14
Sheet1
Cell Formulas
RangeFormula
AF2:AF13AF2=IFERROR(INDEX($A$1:$AE$1,,AGGREGATE(15,6,COLUMN($A$2:$AE$2)-COLUMN($A$2)+1/($A$2:$AE$2="S"),ROWS($AF$2:AF2))),"")
 
Upvote 0
Thanks for the quick response.
I kind did this in a different columns, but need it to be in one cell due to report reasons at the end of the month (among other things).
 
Upvote 0
It can be done easily with Office 365, but I don't know how to deal with it in Excel 2010.

Hope someone else can help you.
 
Upvote 0
TRY THIS:

Excel Formula:
=CONCAT(IF(A2:AE2="S",TEXT(A1:AE1,"yyyy-MM-DD")&", ",""))
 
Upvote 0
TRY THIS:

Excel Formula:
=CONCAT(IF(A2:AE2="S",TEXT(A1:AE1,"yyyy-MM-DD")&", ",""))
This using array formulas you will need to enter the formula with the CNTL-SHIFT-ENTER method instead of pressing ENTER.
 
Upvote 0
2010 does not have Concat it came out with 2019. ;)
 
Upvote 0
what concatenate method was available in 2010? There had to have been one, Was it CONCATENATE?
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,864
Members
449,052
Latest member
Fuddy_Duddy

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