Don Guillett
12/14/2006 8:52:00 PM
Rows(Application.Match(Range("c1"), Columns("a"), 1)).copy range("x2")
--
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
"bearsfan" <bearsfan@discussions.microsoft.com> wrote in message
news:21A3D777-BE15-4AC4-963C-20E64DC944C3@microsoft.com...
> I'm learning alot with using VBA but I also seem to keep encounter new
> challenges. I hope someone can help me with this.
> I have two dates in two seperate columns and a function that calculates
> the
> days in between them. Based on the number of days in between them, I want
> to
> be able to copy the entire row that is closest to the last day of the
> month.
> Based on the values below, I would be copying the row that contains
> 1/28/05
> because that is closest to 1/31/05. I appreciate your help..........
>
>
> columna columnb # of days between Col "a" and Col "b"
> 1/7/2005 1/31/2005 24
> 1/14/2005 1/31/2005 17
> 1/21/2005 1/31/2005 10
> 1/28/2005 1/31/2005 3
>