View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Combination of IF, AND, and COUNTIF; need help

For non contiguous cells, this is the equivalent of the earlier:
=IF(OR(H6="F",H14="F",H18="F"),"F",IF(AND(H6="P",H 14="P",H18="P"),"P",""))

You could also use simple links to "place" all non contiguous cells into a
contiguous range in an empty adjacent part of the sheet, then just use the
earlier COUNTIF checks repointing to the new contiguous range. Or, if the
intervening cells (ie H7:H13 and H15:H17) will not contain anything which
could disturb the required checks, then you could just extend the earlier
range to H6:H18. Joy? hit the YES below
--
Max
Singapore
---
"KL" wrote:
Thanks! Max, That formula works great!
=IF(COUNTIF(H8:H10,"F")0,"F",IF(COUNTIF(H8:H10,"P ")=3,"P",""))


However, now I need a formula for a group of cells (not in a range) that
does the same thing.

For example,

H5 calculates the same thing but is based on cells H6, H14, and H18.

The cells aren't in a range. Is there a way this can be done. When I try to
replace a cell range in this formula with "H6,H14,H18" I get an error.