How do I find the last occurance of a number?

Cyankee

New Member
Joined
Nov 20, 2011
Messages
26
The title really doesn't explain what is going on,

I am writing a story and I use Excel for keeping track of the timeline

What I am trying to do is show how much time has past between the dates in the same chapter, but I also want to see the dates in chronological order.
Some dates get repeated, that's fine, each chapter starts on the same date, but what I want to find is how many days have past between two dates in a chapter.

Example:
I need to know how many days have past from 6/5/2035 and 5/7/2035. Sure I could just point to the cell and be done with it, but, this spreadsheet will change as more chapters are written. Right now there are two lines between the dates I said in the example, but when all is said and done, there will be many more lines there.

I have seen many suggestions, but, I just cannot get them to work.

Date DoWChapterDays Past
05/05/2035Saturday1
05/05/2035Saturday2
05/05/2035Saturday3
05/07/2035Monday2
05/07/2035Monday3
05/21/2035Monday3
06/05/2035Tuesday2
06/20/2035Wednesday3
06/22/2035Friday3
06/25/2035Monday3
07/14/2035Saturday1
07/15/2035Sunday2
07/16/2035Monday1
07/20/2035Friday2
07/25/2035Wednesday2
07/26/2035Thursday2
07/28/2035Saturday1
08/23/2035Thursday2
08/25/2035Saturday2
01/10/2036Thursday2
01/23/2036Wednesday2
04/15/2036Tuesday1
04/25/2036Friday1
06/01/2036Sunday2
06/30/2036Monday2

<tbody>
</tbody>
 

Some videos you may like

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,783
Office Version
  1. 2010
Platform
  1. Windows
Not sure what you're asking for -- maybe this:

A​
B​
C​
D​
1​
Date
Chapter
Days Past
2​
Sat 05/05/2035​
1​
C2: =IFERROR(A2 - LOOKUP(9E+307, A$1:A1 / (B$1:B1=B2)), "")
3​
Sat 05/05/2035​
2​
4​
Sat 05/05/2035​
3​
5​
Mon 05/07/2035​
2​
2​
6​
Mon 05/07/2035​
3​
2​
7​
Mon 05/21/2035​
3​
14​
8​
Tue 06/05/2035​
2​
29​
9​
Wed 06/20/2035​
3​
30​
10​
Fri 06/22/2035​
3​
2​
11​
Mon 06/25/2035​
3​
3​
12​
Sat 07/14/2035​
1​
70​
13​
Sun 07/15/2035​
2​
40​
14​
Mon 07/16/2035​
1​
2​
15​
Fri 07/20/2035​
2​
5​
16​
Wed 07/25/2035​
2​
5​
17​
Thu 07/26/2035​
2​
1​
18​
Sat 07/28/2035​
1​
12​
19​
Thu 08/23/2035​
2​
28​
20​
Sat 08/25/2035​
2​
2​
21​
Thu 01/10/2036​
2​
138​
22​
Wed 01/23/2036​
2​
13​
23​
Tue 04/15/2036​
1​
262​
24​
Fri 04/25/2036​
1​
10​
25​
Sun 06/01/2036​
2​
130​
26​
Mon 06/30/2036​
2​
29​
 

Cyankee

New Member
Joined
Nov 20, 2011
Messages
26
Thank you! That is perfect! Thank you. Thank you. Thank you. Thank you. Thank you.

Had to edit it slightly since the actual spreadsheet is a bit bigger and arranged differently, but it works!
 

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,783
Office Version
  1. 2010
Platform
  1. Windows
You're welcome.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,725
Messages
5,626,512
Members
416,187
Latest member
L_D18

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
Top