I have a formula that works fine when placed in cells as below:
but I cannot get this to translate into VBA - I have tried this, as well as many other things I have searched for on these forums but cant seem to get it right:
among other things but cannot get the syntax correct. I could put the formula in the cell, then copy value only and paste it over, but i'd prefer to do it this way.
Can anyone help?
Code:
=WORKDAY(J7,IF(HOUR(K7)>10,3,2),PubHols)
Code:
range("Main_FTX").Offset(irows) = worksheetfunction.workday(range("Main_ETADate").Offset(irows)),if(hour(range("Main_ETATime").Offset(irows))>10,3,2),range("PubHols"))
among other things but cannot get the syntax correct. I could put the formula in the cell, then copy value only and paste it over, but i'd prefer to do it this way.
Can anyone help?