![]() |
Format(Now) will not work for Feb.+
I'm using the logic below to update items for the current date. This works fine for January, but won't work for Feb. and on for some reason...:confused: Any help will be greatly appreciated! Today = Format(Now, "M/DD/YYYY") col_Numb = 1 'Find the current date for update Do col_Numb = col_Numb + 1 Loop Until Sheet1.Cells(5, col_Numb).Value = Today Or col_Numb = 25 TIA -- cultgag ------------------------------------------------------------------------ cultgag's Profile: http://www.excelforum.com/member.php...o&userid=22677 View this thread: http://www.excelforum.com/showthread...hreadid=508917 |
Format(Now) will not work for Feb.+
supposing your sheet holds dateserials, why make Today a string? assign it like Today = Date (today must be dimmed as a variant or a date/time. even simpler to dmnp your today variable and do: Loop Until col_Numb = 25 or Sheet1.Cells(5, col_Numb).Value = Date -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam cultgag wrote : I'm using the logic below to update items for the current date. This works fine for January, but won't work for Feb. and on for some reason...:confused: Any help will be greatly appreciated! Today = Format(Now, "M/DD/YYYY") col_Numb = 1 'Find the current date for update Do col_Numb = col_Numb + 1 Loop Until Sheet1.Cells(5, col_Numb).Value = Today Or col_Numb = 25 TIA |
Format(Now) will not work for Feb.+
I dumped Today like you said and it worked like a charm! THANKS! : -- cultga ----------------------------------------------------------------------- cultgag's Profile: http://www.excelforum.com/member.php...fo&userid=2267 View this thread: http://www.excelforum.com/showthread.php?threadid=50891 |
All times are GMT +1. The time now is 11:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com