J
Joe Blow
Hello,
I am new to macros, so thought I might try it out. But I don't know
where to read about macros in VBA.
I am trying to substitute a formula I use very often with a VBA macro
here is the cell formula =ROUND((C13-DATE(YEAR(C13),1,1))/7,0)
Here is my macro attempt:
Function WeekOfYear(MyDate)
WeekOfYear = ROUND((MyDate-DATE(YEAR(MyDate),1,1))/7,0)
End Function
I used a cell reference of WeekOfYear(C13), but no luck.
If someone could point me in the right direction, I would greatly
appreciate it.
Joe
I am new to macros, so thought I might try it out. But I don't know
where to read about macros in VBA.
I am trying to substitute a formula I use very often with a VBA macro
here is the cell formula =ROUND((C13-DATE(YEAR(C13),1,1))/7,0)
Here is my macro attempt:
Function WeekOfYear(MyDate)
WeekOfYear = ROUND((MyDate-DATE(YEAR(MyDate),1,1))/7,0)
End Function
I used a cell reference of WeekOfYear(C13), but no luck.
If someone could point me in the right direction, I would greatly
appreciate it.
Joe