In this case, you don't need to loop if you only want all the cells (n2:n50)
to be empty as the second condition
If Range("n1").Value <> "" And Application.CountA(Range("n2:n50")) = 0 Then
item = 1

Signature
Regards,
Tom Ogilvy
> >I receive a 'type mismatch' when trying to use the following line of code to
> >check the contents of cells and then assign a constant to the variable 'item'.
[quoted text clipped - 6 lines]
>
> --ron
Ron Rosenfeld - 22 Jan 2006 04:50 GMT
>In this case, you don't need to loop if you only want all the cells (n2:n50)
>to be empty as the second condition
>If Range("n1").Value <> "" And Application.CountA(Range("n2:n50")) = 0 Then
>item = 1
That's true.
I was being more general.
--ron
Ron Rosenfeld - 22 Jan 2006 04:53 GMT
>In this case, you don't need to loop if you only want all the cells (n2:n50)
>to be empty as the second condition
>If Range("n1").Value <> "" And Application.CountA(Range("n2:n50")) = 0 Then
>item = 1
That's true.
I was being more general and neglected to focus on the OP's issue.
--ron