My code checks the values for cells F8 and H8, and if they're the same it should set CELL A1 to "dim".
Function plchk()
Dim sheet As Worksheet
Set sheet = ActiveWorkbook.Sheets("check")
If CDbl(Trim(sheet.Range("F8").Value)) = CDbl(Trim(sheet.Range("H8").Value)) Then
sheet.Range("A1").Value = "dim"
End If
End Function
On executing this code ,I keep getting the error "VALUE"