# How do I find the last occurance of a number?

#### Cyankee

##### New Member
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 DoW Chapter Days Past 05/05/2035 Saturday 1 05/05/2035 Saturday 2 05/05/2035 Saturday 3 05/07/2035 Monday 2 05/07/2035 Monday 3 05/21/2035 Monday 3 06/05/2035 Tuesday 2 06/20/2035 Wednesday 3 06/22/2035 Friday 3 06/25/2035 Monday 3 07/14/2035 Saturday 1 07/15/2035 Sunday 2 07/16/2035 Monday 1 07/20/2035 Friday 2 07/25/2035 Wednesday 2 07/26/2035 Thursday 2 07/28/2035 Saturday 1 08/23/2035 Thursday 2 08/25/2035 Saturday 2 01/10/2036 Thursday 2 01/23/2036 Wednesday 2 04/15/2036 Tuesday 1 04/25/2036 Friday 1 06/01/2036 Sunday 2 06/30/2036 Monday 2

<tbody>
</tbody>

### Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

#### shg

##### MrExcel MVP
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
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!

You're welcome.

Replies
5
Views
72
Replies
3
Views
95
Replies
5
Views
397
Replies
3
Views
26
Replies
2
Views
82

1,127,040
Messages
5,622,343
Members
415,894
Latest member
silverhaze

### 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.

### Which adblocker are you using?

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

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