![]() |
date format, looking for a date in column A that is one year ago
hi guys
i need your help again! i have a macro which looks for specific names in column A and then copies them to a new sheet. i now need to write it so that it searches for a date in column C that is a year ago from today. any suggestions? thanks mike |
date format, looking for a date in column A that is one year ago
The following will return the date that is a year ago from today. Adjust as
needed. Sub DisplayYrAgo() Dim YearAgo As Date YearAgo = DateSerial(Year(Now()) - 1, Month(Now()), Day(Now())) MsgBox YearAgo End Sub "mike" wrote: hi guys i need your help again! i have a macro which looks for specific names in column A and then copies them to a new sheet. i now need to write it so that it searches for a date in column C that is a year ago from today. any suggestions? thanks mike |
All times are GMT +1. The time now is 02:41 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com