ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Please Help..................... (https://www.excelbanter.com/excel-programming/379449-re-please-help.html)

Don Guillett

Please Help.....................
 
Sub fld()'where 1/31/2005 properly formatted date in c1
Rows(Application.Match(Range("c1"), Columns("a"), 1)).Copy Range("a22")
End Sub

--
Don Guillett
SalesAid Software

"bearsfan" wrote in message
...
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





All times are GMT +1. The time now is 06:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com