Subtracting dates for days of rest for a player

mdean32

New Member
Joined
Jan 15, 2019
Messages
22
I have an ongoing database with multiple players. I need a formula to sort days of rest in between games (Column C) without sorting the players. I can get this to work if I sort the player ascending, but this causes extra work with the daily feed. I was wondering if there was a way to do this without sorting? Thanks for your help

PLAYER DATE REST DAYS
[TABLE="width: 500"]
<tbody>[TR]
[TD]PlayerA[/TD]
[TD]1-1-19[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]PlayerB[/TD]
[TD]1-3-19[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]PlayerA[/TD]
[TD]1-4-19[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]PlayerB[/TD]
[TD]1-4-19[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]PlayerA[/TD]
[TD]1-8-19[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]PlayerB[/TD]
[TD]1-14-19[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]PlayerA[/TD]
[TD]1-9-19[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]PlayerB[/TD]
[TD]1-16-19[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Try:

Excel 2012
ABC
PLAYER DATE REST DAYS
PlayerA
PlayerB
PlayerA
PlayerB
PlayerA
PlayerB
PlayerA
PlayerB

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]1/1/2019[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]1/3/2019[/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]1/4/2019[/TD]
[TD="align: right"]2[/TD]

[TD="align: center"]5[/TD]

[TD="align: right"]1/4/2019[/TD]
[TD="align: right"]0[/TD]

[TD="align: center"]6[/TD]

[TD="align: right"]1/8/2019[/TD]
[TD="align: right"]3[/TD]

[TD="align: center"]7[/TD]

[TD="align: right"]1/14/2019[/TD]
[TD="align: right"]9[/TD]

[TD="align: center"]8[/TD]

[TD="align: right"]1/9/2019[/TD]
[TD="align: right"]0[/TD]

[TD="align: center"]9[/TD]

[TD="align: right"]1/16/2019[/TD]
[TD="align: right"]1[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C2[/TH]
[TD="align: left"]=IFERROR(B2-LOOKUP(2,1/($A$1:$A1=A2),$B$1:$B1)-1,"")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,226,693
Messages
6,192,471
Members
453,726
Latest member
JoeH57

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