title: Required field validation on microsoft excel
body: <p>I have 5 columns (SNO,Name,Phone,Address,Pin)  in excel(2003/2007).<br>
  Excel can have "n" no. of records.<br>
  I want to apply a validation , such that , when we save the excel sheet,value of "SNO"(which contains integer value) column should never be empty , when any one (Name,Phone,Address,Pin) column has value.<br>
  If this is not the case then an error message should come.<br>
  I am entering the data manually.<br>
  I tried :<br>
  EDIT:</p>
  
  <pre><code>Private Sub Workbook_BeforeClose(Cancel As Boolean)
      If Worksheets("Sheet1").Range("SNO").Value = "" Then
          MsgBox "You must fill in SNO."
          Cancel = True
      End If
  End Sub
  </code></pre>
  
  <p>Can we apply the validation , without writing the code?</p>