happy_smiler1
New member
- Joined
- Aug 28, 2012
- Messages
- 67
- Reaction score
- 0
- Points
- 0
- Excel Version(s)
- office 365
Hi All,
I wanted to be able to find the difference between two dates based on whether one criteria is the same as the criteria above it if so calculate the date difference between, if it doesnt then leave it and go to the next. Please find an example of my data set below:
e.g from my data set below - for customer id 1, row 4 would look up row 3 for customer id and because they match, it would calculate the date difference, same for row 3 to row 2, but row 2 doesnt have any data above it, it would automatically throw out a 0 against it.
A B C
Any help would be greatly appreciated.
TIA
I wanted to be able to find the difference between two dates based on whether one criteria is the same as the criteria above it if so calculate the date difference between, if it doesnt then leave it and go to the next. Please find an example of my data set below:
e.g from my data set below - for customer id 1, row 4 would look up row 3 for customer id and because they match, it would calculate the date difference, same for row 3 to row 2, but row 2 doesnt have any data above it, it would automatically throw out a 0 against it.
A B C
Customer ID | Date | Amount |
1 | 01/01/2012 | 20 |
1 | 02/01/2015 | 20 |
1 | 03/01/2016 | 35 |
3 | 12/12/2015 | 65 |
3 | 13/12/2018 | 12 |
5 | 23/01/2005 | 5 |
5 | 15/05/2007 | 14 |
12 | 14/02/2004 | 13 |
12 | 15/02/2006 | 8 |
12 | 16/02/2009 | 16 |
12 | 17/02/2012 | 19 |
13 | 16/05/2013 | 100 |
13 | 17/05/2014 | 120 |
13 | 18/05/2015 | 100 |
Any help would be greatly appreciated.
TIA