View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Finding number of empty cells

Formulas should not cause a problem.
The first number in Cells(1, 2) specifies the row number.
The second number specifies the column number.
The above is Range("B1")

When specifying a range, you normally use the top left cell
and the bottom right cell. However, either one can come first.
Range("G1", "J10") is the same as Range("J10", "G1")
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Floyd"
wrote in message
Trial Number 2:
The "blank" cells contain the following formula, which may be
interfering with the calculation:
=IF(OR(AND(V2=$G129,V2<$J128),AND(V2=$J129,V2<$J 130)),"X"," ")

This function
Function CountColumns(RngStartingPoint As Excel.Range) As Long
CountColumns = Application.CountBlank(Range(RngStartingPoint, _
Cells(1, Columns.Count).End(xlToLeft)))
End Function

provides wildly large numbers such as 616 instead of 2.
Should I have modified the "1" to match the row for others rows besides
one?
Also, is the countblank being messed up due to the equation that is in
those cells?
Thanks in advance.
I truly appreciate your responses.
Cheers.