Formulas for pulling data from volunteer shift log

salange

Board Regular
Joined
Mar 4, 2002
Messages
62
I am tracking volunteer shifts in a spreadsheet that looks like this:

https://photos.google.com/share/AF1...?key=cXhJblNNd2dyN0g3OVZ3ZFBVeVpzbGdJdWxuUjN3

I want two forumulas:

1- A formula that identifies the most recent date on which each vol worked. It should return 1/13 for Olivera in the first row, 1/15 for McDaniel in the second row, etc. Seems like it should be easy but I'm struggling to do it neatly.

2- A formula that identifies the longest "streak" of days without volunteering for each person. In other words, most days between shifts. Not sure how to get started with this one.

Thanks in advance for any help you can provide!
 
Last edited by a moderator:

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Excel 2013/2016
CDEFGHIJKLMNOPQRSTUVWXYZ
1
2MTuWThFSaSuMTuWThFSaSuMTuWThFSaSu
31/12/13/14/15/16/17/18/19/110/111/112/113/114/115/116/117/118/119/120/121/1Most Rec DtMost Days in between
4Olivera112/111
5Daniel115/114
6Donald0.513/112
7Book211/110
8Paugett121/120
9Wall15/116
10Gilmore216/115
11Ward19/112
12Uro212/111
13
Sheet1



Excel 2013/2016
Y
412/1
Sheet1
Cell Formulas
RangeFormula
Y4=LOOKUP(10^100,$D4:$X4,$D$3:$X$3)




Excel 2013/2016
Z
411
Sheet1
Cell Formulas
RangeFormula
Z4{=MAX(FREQUENCY(IF(C4:X4="",COLUMN(C4:X4)),IF(C4:X4<>"",COLUMN(C4:X4))))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
The first answer is perfect - thank you!\

The second answer appears to be counting "the future" (and presumably, "the past",) as a gap. I need it to count only the days that are actually between two shifts, not days that are "before the first" and "after the last" shift. Any tweak that will get the job done?

Thanks in advance!
 
Upvote 0
you need to replace the reference that is inside the formula (C4:X4) with:
Code:
INDEX($D4:$X4,MATCH(10^100,$D4:$X4)):INDEX($D4:$X4,MATCH(TRUE,ISNUMBER($D4:$X4),0))

so it becomes (always with Control Shift Enter):

Code:
=MAX(FREQUENCY(IF(INDEX($D4:$X4,MATCH(10^100,$D4:$X4)):INDEX($D4:$X4,MATCH(TRUE,ISNUMBER($D4:$X4),0))="",COLUMN(INDEX($D4:$X4,MATCH(10^100,$D4:$X4)):INDEX($D4:$X4,MATCH(TRUE,ISNUMBER($D4:$X4),0)))),IF(INDEX($D4:$X4,MATCH(10^100,$D4:$X4)):INDEX($D4:$X4,MATCH(TRUE,ISNUMBER($D4:$X4),0))<>"",COLUMN(INDEX($D4:$X4,MATCH(10^100,$D4:$X4)):INDEX($D4:$X4,MATCH(TRUE,ISNUMBER($D4:$X4),0))))))

If you dont want the formula to be this long, I would select any cell in row 4 in my example, and add a Named Range called, for instance, FirstLastShift and add this a formula:
Code:
INDEX($D4:$X4,MATCH(10^100,$D4:$X4)):INDEX($D4:$X4,MATCH(TRUE,ISNUMBER($D4:$X4),0))
then you could have:
Code:
=IFERROR(MAX(FREQUENCY(IF(FirstLastShift="",COLUMN(FirstLastShift)),IF(FirstLastShift<>"",COLUMN(FirstLastShift)))),"Only One or No Shifts!")
 
Last edited:
Upvote 0
That does it. I added in a little IF() to turn the "one shift only" people into blanks instead of errors, but otherwise, perfect. Thank you so much!!
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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