CodingGirl963
CodingGirl963

Reputation: 5

Get count of days from last date over time? (non-VBA)

I have two columns like so:

Item | Date 
Item1 | 1/1/20
Item2 | 1/2/20
Item1 | 1/3/20
Item2 | 1/4/20
Item1 | 1/6/20
Item2 | 1/8/20

I want to be able to get a count of days passed since any item showed from its last date, like so:

Item | Date | Days passed
Item1 | 1/1/20 | 0
Item2 | 1/2/20 | 0
Item1 | 1/3/20 | 2
Item2 | 1/4/20 | 2
Item1 | 1/6/20 | 3
Item2 | 1/8/20 | 4

Any ideas that are a non-VBA solution?

Upvotes: 0

Views: 31

Answers (1)

Naresh
Naresh

Reputation: 3034

=B10-LOOKUP(2,1/($A$4:A9=A10),$B$4:B9)

enter image description here

Upvotes: 1

Related Questions