View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
ytayta555 ytayta555 is offline
external usenet poster
 
Posts: 247
Default Need a UDF to count blank cells

On 22 feb., 16:19, "Charabeuh" wrote:
hello,
When using the function, it works the first time.


INDEED . I was busy to check it

I added Application.volatile in the code of Mike H .....


I use this code :

Sub MYMACRO()

Dim myCell As Range
Dim myRng1 As Range
Set myRng1 = Range("A1:E30")

For Each myCell In myRng1.Cells
If myCell < vbNullString Then
myCell = "=countnull()"
End If
Next myCell

End Sub

and now , IT WORKS great .

I have to thank you - to all three - very much ,
that you used and shared your knowledge and time
helping me . I wish you a good week