My problem is with the MOD function, but only when it's in a validation condition
The MOD function here works fine,
Current_Worksheet.Range("G8:G" & Mid(last_cell, 4, 3)).Formula = "=IF(OR(ISBLANK(A8),ISBLANK(C8),ISBLANK(D8),ISBLAN K(F8),ISBLANK(F8),MOD(MINUTE(C8),15)>0,MOD(MINUTE(D8),15)>0,MOD(MINU TE(E8),15)>0,MOD(MINUTE(F8),15)>0,(H8)<=0,(C8)>(D8),(D8)>(E8),(E8)>(F8),ISERROR(H8) ,ISERROR(I8),ISERROR(O8),ISERROR(P8)),1,IF(OR((C8) <0.270833333,(C8)>0.770833334),1,IF(OR((D8)<0.2708 33333,(D8)>0.770833334),1,IF(OR((E8)<0.270833333,( E8)>0.770833334),1,IF(OR((F8)<0.270833333,(F8)>0.7 70833334),1,10)))))"
The ISBLANK function works fine, bu tif I try and change the function it fails
Current_Worksheet.Range("A8:F" & Mid(last_cell, 4, 3)).Select
With Selection
Current_Worksheet.Range("A8:F" & Mid(last_cell, 4, 3)).FormatConditions.Add Type:=xlExpression, Formula1:="=ISblank(A8:F" & Mid(last_cell, 4, 3)
Current_Worksheet.Range("A8:F" & Mid(last_cell, 4, 3)).FormatConditions(1).Interior.Color = 255
End With
What I'd like to be able to do is repalce the above ISBLANK function with the MOD function, but can't get the syntax correct.
Used for when the cell is not blank and the value is not a multiple of 15 minutes
Current_Worksheet.Range("A8:F" & Mid(last_cell, 4, 3)).Select
With Selection
Current_Worksheet.Range("A8:F" & Mid(last_cell, 4, 3)).FormatConditions.Add Type:=xlExpression, Formula1:="=MOD(MINUTE(A8:F" & Mid(last_cell,4,3)),15)>0
Current_Worksheet.Range("A8:F" & Mid(last_cell, 4, 3)).FormatConditions(1).Interior.Color = 255
End With
any help would be great.