by MYLE
10. June 2010 05:13
I first wrote this function in lotus 123
off top of heap going back 20+ year +iif((a1 mod 7)>0,a1-(a1 MOD7)+7,a1)) please don't quote me on this
this would of been one of my first function I wrote
Public Function WEEKEND(dat) As Date
If IsNull(dat) Then Exit Function
dat = DateSerial(Year(dat), Month(dat), Day(dat))
If dat Mod 7 > 0 Then
WEEKEND = dat - dat Mod 7 + 7
Else
WEEKEND = dat
End If
End Function
I know the Above Function works in VB
Work in
excel
Msaccess
e3d88167-1b0a-4179-bbba-a922e26c19ef|1|5.0