Where's the bug?
with 3/15/04 (formated date) in Cell B5
and =Spdate(B5) in D5 -- results -- #VALUE! 'Help
Function SpDate(MyDate As Date) As String
Dim MYr As String
Dim MWk As String
Dim MDy As String
MYr = Year(MyDate)
MWk = Round((MyDate - DateSerial(Year(MyDate), 1, 1)) / 7, 0)
MDy = Day(MyDate)
SpDate = "MYr&" / "&MWk&" / "&MDy"
End Function
|