Calculate Days Rest

JGriffo33

New Member
Joined
Nov 6, 2016
Messages
21
I want to calculate days rest between two dates that are in the same column

A1 = Team
E1 = Date
K1 = Days Rest (formula needed here)

A2 = Team 1
A3 = Team 2
A4 = Team 3
A5 = Team 1
A6 = Team 3

E2 = 20/11/2016
E3 = 20/11/2016
E4 = 21/11/2016
E5 = 23/11/2016
E6 = 23/11/2016

K2 = 0
K3 = 0
K4 = 0
K5 = 2
K6 = 1

How do I get a formula that will recognise the team name in column A and see the dates in the range from column E and calculate the days rest, which is only between the dates not the days including?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hello JG,

please use this formula.
{=MAX(IF($A$2:$A$7=A2,$B$2:$B$7,""))-MIN(IF($A$2:$A$7=A2,$B$2:$B$7,""))}

It will work.
 
Upvote 0
Thanks mate, but the formula doesn't work on a bigger scale, I wrote my example as the first 5 entries, but I have data for at least 500 entries. Instead of $A$7 I have changed to $A$449 but the values come back as 335, 305, 274 etc. I'm not sure if it's because they are looking at dates and not calculating properly because I'm using Australian date format
 
Upvote 0
did you change both instances of A7 and both instances of B7 as well?

Since that is an array formula it needs to be input with CONTROL + SHIFT + ENTER instead of just enter. The {} curly braces do not get typed in manually but instead appear when you input an array formula properly. Have you done that?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,332
Members
449,077
Latest member
jmsotelo

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