Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try again
You can count the number of non-blank cells in a range like so myVar = Application.COUNTA(Range("A1:B10") but not the number of blank rows, because if two cells on the same row have data, you will get 2 not 1. To get that, you would need to check each row, like so Dim oRow As Range Dim cNonBlanks As Long For Each oRow In Range("50:80").Rows If Application.CountA(oRow) < 0 Then cNonBlanks = cNonBlanks + 1 End If Next oRow -- HTH RP (remove nothere from the email address if mailing direct) "Gerrym" wrote in message ... Bob Your reply didn't come through. Gerry -----Original Message----- Message unavailable |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using COUNTA for a variable array | Excel Worksheet Functions | |||
Setting a Date variable | Excel Programming | |||
Setting variable = to sheet name | Excel Programming | |||
setting a range variable equal to the value of a string variable | Excel Programming | |||
Setting range value to a variable | Excel Programming |