View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_7_] Bob Phillips[_7_] is offline
external usenet poster
 
Posts: 1,120
Default Change message to include range


IF Worksheetfunction.COUNTA(Range("I24:I1000")) = _
Worksheetfunction.COUNT(Range("I24:I1000")) Then
If Cells(22, 11).Value = "QS" Then
MsgBox "There is data in column I24:I1000, find and delete this
data"
Exit Sub
End If
End If

--
HTH

Bob Phillips

"Pat" wrote in message
...
The want to change the following code:

If Cells(22, 11).Value = "QS" Then
MsgBox "Previous code"
Exit Sub
End If

To this:

If IsNumeric("I24:I1000").Value
If Cells(22, 11).Value = "QS" Then
MsgBox "There is data in column I24:I1000, find and delete this
data"
Exit Sub
End If

The change to the code is to inform the user that there is data in the
range I24:I1000