View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_3_] Alan Beban[_3_] is offline
external usenet poster
 
Posts: 130
Default countif constants in a Range

See if rng.SpecialCells(xlConstants).Count returns your desired result.

Alan Beban

ibeetb wrote:
I have a range of 20 cells in a range. These cells are mixed with constants,
blanks, and formulas. I want to do a countif (via code) of the cells in the
range which hold constants ONLY. I though the haveformula property would
work, but this property seems to be absolute....counting all or none based
on if there is an instance of a formula in any of the cells in this range

can someone please assist.....

Thank you