View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default msg box to stop user if range is "" (tricky one)

Loop the columns

For ColNum To 2 To 20

If Cells(5,ColNum) < "" Then
If Cells(23,ColNum) = "" Then
Call Msgbox "unable to clear"
End If
End If
Next ColNum

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"pswanie" wrote in message
...


will i need to repeat this for every column?
or is there a loop idea that i can do?
where would i tell it to first do sheet1 and then sheet2


Try this:

If Cells(5,2) < "" Then
If Cells(23,2) = "" Then
Call Msgbox "unable to clear"
End If
End If