View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove
 
Posts: n/a
Default Ignoring text and errors with Sumproduct

SteveC wrote...
I have a ranking formula for numerical values in Column J based on Text
categories in Column A:

=SUMPRODUCT(--(A$13:A$2651=A13),--(J13<J$13:J$2651))+1

It doens't work because some of the cells in Column J include error or text
values.

How can I make this formula work so that it ignores these error/text values?


The best way would be to eliminate the error values in col J. Filtering
out text is simple:

=SUMPRODUCT(--(A$13:A$2651=A13),--ISNUMBER(J$13:J$2651),--(J13<J$13:J$2651))+1

Filtering out error values can't be done without using the IF function,
and IF requires that formulas calling it be entered as array formulas
when IF should return array results. If you can't eliminate the error
values in col J, you'll have to use the array formula

=SUM((A$13:A$2651=A13)*IF(ISNUMBER(J$13:J$2651),J1 3<J$13:J$2651))+1