View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jcannon1 jcannon1 is offline
external usenet poster
 
Posts: 3
Default How to count cells that do not contain "-"

Thanks Mike! This worked perfectly. Can you tell me what the 2 dashes ("--")
after the sumproduct signify?

"Mike H" wrote:

Did you try this sumproduct formula

=SUMPRODUCT(--(ISNUMBER(A8:E8)))

Mike

"jcannon1" wrote:

I have a row of data where each cell is using a VLOOKUP formula - the formula
either returns a number or "-". I need to count all the cells that contain a
NUMBER only and I don't want to count the cells that contain "-". I have
tried COUNTIF, SUMPRODUCT...

Please help

Example

A B C D
1 3 - 4 I want formula in this cell to return the
value of 2 (because there are numbers in cell A1 and C1, while B1 contains
"-" which I don't want to count.