View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Error: If Range("AZ" & intCounter).Text = "" Then

Hi,

I'm not sure I fully understand what you mean but if you apply the test

If Range("AZ" & intCounter).Text = "" Then

to the cells and they are empty then that will evaluate as TRUE, it doesn't
mean the cell contains the value TRUE. For example try this small routine on
your cells

Sub nnn()
For intcounter = 1 To 20
If Range("AZ" & intcounter).Text = "" Then
MsgBox Range("AZ" & intcounter).Text = ""
Else
MsgBox Range("AZ" & intcounter).Text = ""
End If
Next
End Sub

Empty cell evalute as TRUE and populated cells evaluate as FALSE

Mike

" wrote:

I have a very strange error in Excel 2003:

All cells in column AZ are empty. When I run this code:

If Range("AZ" & intCounter).Text = "" Then

it says that the cells contain the value TRUE.

How can this be possible?

Very grateful for help!

// S