Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try the macro below. (I broken one of the very long statement into
multi-lines.) Sub change_url() Dim cell As Object Dim tmp$, tmp2$ With ActiveSheet.Range("A10:A19") For Each cell In .Cells tmp = cell.Value If InStr(tmp, "http") < 0 Then If InStr(12, tmp, "/") < 0 Then cell.Value = Left(tmp, InStr(12, tmp, "/")) & _ Format(Date, "yyyy") & "/" & Format(Date, "mm") & _ "/" & Format(Date, "dd") & "/" & _ Right(tmp, Len(tmp) - Len(Left(tmp, InStr(12, tmp, "/"))) - 11) End If End If Next End With End Sub Regards, Edwin Tam http://www.vonixx.com "Martin Wheeler" wrote: xl2003, winXP I have a range of 10 URLs. A10-A19 Each day I need to update them to the current date. The URL looks like:- URL;http://www.tabonline.com.au/2006/02/23/NR05.html So tomorrow I will want to be able to push a button and /2006/02/23 becomes /2006/02/24 in all 10. I need to do this programatically as it will be part of a series of operations. Any help would be greatly appreciated. Ta, Martin |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
date in Cell to change colors if the date is beyond today's date | Excel Discussion (Misc queries) | |||
Change satellite julian date format YYYYDDDHHMMSS to excel date ti | Excel Discussion (Misc queries) | |||
Use date modified to change format & create filter to track change | Excel Worksheet Functions | |||
change background row color with change of date in a cell | Excel Discussion (Misc queries) | |||
Make date change in excel to current date when opening daily? | Excel Discussion (Misc queries) |