Hello,
i would like my vba to check Dates on my worksheet if they are far away from each other but i seem to get an error in my formula.
this is what it looks like:
If ((Workday(Range("$E$"),1)-Workday(Range("$G$"),1))*Worksheet("ignore").Range("C20"))>Range("$F$") then
msgbox("test")
end if
what this would do is:
substract 2 dates in my worksheet and multiply it by "c20" on my ignore sheet (now i have the time in hours instead of days), then it compares those hours to "Range("$F$")" , if i have more hours then "Range("$F$") then i want a messagebox to appear.
thank you.
i would like my vba to check Dates on my worksheet if they are far away from each other but i seem to get an error in my formula.
this is what it looks like:
If ((Workday(Range("$E$"),1)-Workday(Range("$G$"),1))*Worksheet("ignore").Range("C20"))>Range("$F$") then
msgbox("test")
end if
what this would do is:
substract 2 dates in my worksheet and multiply it by "c20" on my ignore sheet (now i have the time in hours instead of days), then it compares those hours to "Range("$F$")" , if i have more hours then "Range("$F$") then i want a messagebox to appear.
thank you.