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

Try

Countif($A$1:$D$1,"0")

"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.