Hi there. Im using this formula in Cell N4
N4 has general formatng. This work as a charm. I get the output "Week [and a single digit number]"
However, I need to control this from VBA
The code:
.. Returns "Weekday 1,71428571428571"
Somethng is obviously wong here but cant figure out what.
Any input woulde much appreciated.
Tanks
Code:
="Week "&(N6-($D$4-WEEKDAY($D$4;1)+2))/7+1
However, I need to control this from VBA
The code:
PHP:
Private Sub Commandbutton1_Click()
Range("N4").Value = "Weekday " & (N6 - (C8 - Weekday(C8, 1) + 2)) / 7 + 1
End Sub
.. Returns "Weekday 1,71428571428571"
Somethng is obviously wong here but cant figure out what.
Any input woulde much appreciated.
Tanks
Last edited: