It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Count empty cells in the range

Moderator: dafunkymunky

Count empty cells in the range

Postby alkas on Mon May 14, 2007 2:01 pm

Hi
I am trying to count empty cells in the range from the macro.
Idea is to count empty cells in one row, but cells to be counted are discontinued (range A10:A15, A25:A30. ETC....). Other difficulty is that I can not define the range exactly like this, but I have to use ActiveCell.Offset (0,10) or ActiveCell.Offset(0,11) etc...
ActiveCell is A1.
Itried something like this, but it does not work since I can not define the range correctly.
Dim c
Dim numBlanks
numBlanks = 0
For Each c In Range("ActiveCell.Offset (0,10)")
If c.Value = "" Then
numBlanks = numBlanks + 1
End If
Next c

Help anyone
alkas
 
Posts: 4
Joined: Fri Mar 30, 2007 6:42 am

Who is online

Users browsing this forum: No registered users and 7 guests