Hi;
I have a spreadsheet that I need to calculate the date difference in days between each row that has the same LogIn. So I need the date difference in days between row 1 & 2, then 2 & 3, because the LogIn is the same, but row 4 has a new LogIn that would need to begin. The sort would be on the LogIn, then by date in ascending order. I pasted some sample data, just not sure how to do this with VBA.
Appreciate any insight on this if possible, days would be posted in column c.
I have a spreadsheet that I need to calculate the date difference in days between each row that has the same LogIn. So I need the date difference in days between row 1 & 2, then 2 & 3, because the LogIn is the same, but row 4 has a new LogIn that would need to begin. The sort would be on the LogIn, then by date in ascending order. I pasted some sample data, just not sure how to do this with VBA.
Appreciate any insight on this if possible, days would be posted in column c.
[TABLE="width: 128"]
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl67, width: 64"]LogIn[/TD]
[TD="class: xl67, width: 64"]JP Date[/TD]
[/TR]
[TR]
[TD="class: xl65"]6122218[/TD]
[TD="class: xl66, align: right"]1/7/2013[/TD]
[/TR]
[TR]
[TD="class: xl65"]6122218[/TD]
[TD="class: xl66, align: right"]5/1/2013[/TD]
[/TR]
[TR]
[TD="class: xl65"]6122218[/TD]
[TD="class: xl66, align: right"]5/1/2013[/TD]
[/TR]
[TR]
[TD="class: xl65"]6110416[/TD]
[TD="class: xl66, align: right"]9/14/2009[/TD]
[/TR]
[TR]
[TD="class: xl65"]6110416[/TD]
[TD="class: xl66, align: right"]7/1/2010[/TD]
[/TR]
[TR]
[TD="class: xl65"]6745793[/TD]
[TD="class: xl66, align: right"]1/26/2009[/TD]
[/TR]
[TR]
[TD="class: xl65"]6745793[/TD]
[TD="class: xl66, align: right"]1/26/2009[/TD]
[/TR]
[TR]
[TD="class: xl65"]6745045[/TD]
[TD="class: xl66, align: right"]1/11/2009[/TD]
[/TR]
[TR]
[TD="class: xl65"]6745045[/TD]
[TD="class: xl66, align: right"]11/1/2010[/TD]
[/TR]
[TR]
[TD="class: xl65"]6745045[/TD]
[TD="class: xl66, align: right"]3/19/2013[/TD]
[/TR]
[TR]
[TD="class: xl65"]6741547[/TD]
[TD="class: xl66, align: right"]10/13/2007[/TD]
[/TR]
[TR]
[TD="class: xl65"]6741547[/TD]
[TD="class: xl66, align: right"]5/28/2014[/TD]
[/TR]
[TR]
[TD="class: xl65"]6741056[/TD]
[TD="class: xl66, align: right"]5/11/2009[/TD]
[/TR]
[TR]
[TD="class: xl65"]6741056[/TD]
[TD="class: xl66, align: right"]7/1/2012[/TD]
[/TR]
[TR]
[TD="class: xl65"]6747483[/TD]
[TD="class: xl66, align: right"]2/16/2009[/TD]
[/TR]
[TR]
[TD="class: xl65"]6747483[/TD]
[TD="class: xl66, align: right"]8/1/2013[/TD]
[/TR]
[TR]
[TD="class: xl65"]6747483[/TD]
[TD="class: xl66, align: right"]7/5/2016[/TD]
[/TR]
[TR]
[TD="class: xl65"]6747483[/TD]
[TD="class: xl66, align: right"]7/5/2016[/TD]
[/TR]
[TR]
[TD="class: xl65"]6749505[/TD]
[TD="class: xl66, align: right"]12/13/2008[/TD]
[/TR]
[TR]
[TD="class: xl65"]6749505[/TD]
[TD="class: xl66, align: right"]10/4/2010[/TD]
[/TR]
[TR]
[TD="class: xl65"]6749505[/TD]
[TD="class: xl66, align: right"]10/28/2015[/TD]
[/TR]
[TR]
[TD="class: xl65"]6775892[/TD]
[TD="class: xl66, align: right"]12/13/2008[/TD]
[/TR]
[TR]
[TD="class: xl65"]6775892[/TD]
[TD="class: xl66, align: right"]8/21/2013[/TD]
[/TR]
[TR]
[TD="class: xl65"]6775196[/TD]
[TD="class: xl66, align: right"]5/16/2009[/TD]
[/TR]
[TR]
[TD="class: xl65"]6775196[/TD]
[TD="class: xl66, align: right"]6/4/2012[/TD]
[/TR]
[TR]
[TD="class: xl65"]6773328[/TD]
[TD="class: xl66, align: right"]2/6/2009[/TD]
[/TR]
[TR]
[TD="class: xl65"]6773328[/TD]
[TD="class: xl66, align: right"]8/4/2010[/TD]
[/TR]
[TR]
[TD="class: xl65"]6773328[/TD]
[TD="class: xl66, align: right"]5/1/2012[/TD]
[/TR]
[TR]
[TD="class: xl65"]6773328[/TD]
[TD="class: xl66, align: right"]3/1/2014[/TD]
[/TR]
[TR]
[TD="class: xl65"]6773620[/TD]
[TD="class: xl66, align: right"]1/5/2009[/TD]
[/TR]
[TR]
[TD="class: xl65"]6773620[/TD]
[TD="class: xl66, align: right"]7/5/2010[/TD]
[/TR]
[TR]
[TD="class: xl65"]6773620[/TD]
[TD="class: xl66, align: right"]2/1/2011[/TD]
[/TR]
[TR]
[TD="class: xl65"]6773620[/TD]
[TD="class: xl66, align: right"]3/22/2013[/TD]
[/TR]
[TR]
[TD="class: xl65"]6773620[/TD]
[TD="class: xl66, align: right"]11/1/2013[/TD]
[/TR]
[TR]
[TD="class: xl65"]6773620[/TD]
[TD="class: xl66, align: right"]11/1/2013[/TD]
[/TR]
</tbody>[/TABLE]
Last edited: