Hi all,
I have a problem with the Format & CDate function.
I got the error "Wrong number of arguments or invalid property assignment" and I don't understand why. Each time I want to Format with a "F", it automatically puts it with a "f" also.. Before it was working and now I have the erroe message.
Has anyone an idea why I got this problem ?
Thanks
On the sheet "SPIExtractfinal", in each first cell of every 233th row, I have the text "SPI® TR as of 01-07-2010" and I want the macro to get me the date. On Each 233th row is a different date..
I have a problem with the Format & CDate function.
I got the error "Wrong number of arguments or invalid property assignment" and I don't understand why. Each time I want to Format with a "F", it automatically puts it with a "f" also.. Before it was working and now I have the erroe message.
Has anyone an idea why I got this problem ?
Thanks
On the sheet "SPIExtractfinal", in each first cell of every 233th row, I have the text "SPI® TR as of 01-07-2010" and I want the macro to get me the date. On Each 233th row is a different date..
Code:
Sub SPIpricecopydate()
Dim strValue As String
Dim strCellNum As String
Dim cleandate As String
Dim x As String
x = 2
For i = 2 To 58951 Step 233
strCellNum = "A" & i
strValue = Worksheets("SPIExtractfinal").Range(strCellNum).Value
Debug.Print strValue
Worksheets("SPICleanprice").Range("A" & x).Value = format(CDate(Right(strValue, 10)), "dd/mmm/yy")
x = x + 1
Next
End Sub