Try this:
Function IsHidden() As Boolean
    Application.Volatile
    IsHidden = Application.Caller.EntireRow.Hidden
End Function
Example usage: =IF(IsHidden(), 1, 0)