View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Martin Wheeler Martin Wheeler is offline
external usenet poster
 
Posts: 57
Default Change date in URL

Hi Mud,
Thanks for the code. Cannot test it right now as my only computer is doing
critical stuff. Will do so in a few hours
Ta,
Martin


"mudraker" wrote in
message ...

Sub ChangeURL()

Dim iRow As Integer
Dim iDate As Integer

Dim dDate As Date

Dim sTxt() As String
Dim sCol As String

sCol = "E"
dDate = DateValue(Mid(Range("e1"), 33, 10)) + 1
For iRow = 1 To 10 Step 1
ReDim sTxt(1)
sTxt(0) = Cells(iRow, sCol)
For iDate = 16 To Len(sTxt(0)) Step 1
If IsDate(Mid(sTxt(0), iDate, 10)) Then
dDate = DateValue(Mid(sTxt(0), iDate, 10)) + 1
sTxt(1) = Left(sTxt(0), iDate - 1) _
& Format(dDate, "yyyy/mm/dd") _
& Mid(sTxt(0), iDate + 10)
Exit For
End If
Next iDate

Cells(iRow, sCol).Value = sTxt(1)
Next


--
mudraker
------------------------------------------------------------------------
mudraker's Profile:
http://www.excelforum.com/member.php...fo&userid=2473
View this thread: http://www.excelforum.com/showthread...hreadid=515580