Partial short answer
The formula in I4 has some syntax errors
- Use of the wrong quotation character
- Use of equal sign after commas
Also, the formulas in I3 and I4 have some programming errors:
- Wrong references
- "Unnecessary complexity"
Explanation
Syntax errors
Quotation marks
Modern applications use a large number of characters some of them are visually very similar like "
(U+0022 QUOTATION MARK), ”
(U+201D RIGHT DOUBLE QUOTATION MARK) and ʺ
(U+02BA MODIFIER LETTER DOUBLE PRIME) but for technical purposes, like enclosing strings in spreadsheet formulas, "
(U+0022 QUOTATION MARK) should be used. It's worth to say that some text processors like Microsoft Word could automatically replace "
by ”
so when using and external application as a helper to write complex formulas the related feature should be turned off.
Equal sign
The equal sign could be used as an operator in spreadsheet formulas at the beginning of a formula or as a comparison operator, but not after the function arguments separator (comma or semicolon, according to the spreadsheet locale settings)
Programming errors
Yes, writing a spreadsheet formula makes people to be programmers but usually they are called analysts or just spreadsheet users.
Wrong references
The formula in I4 include references to columns that don't exists (M4,K4,S4,L4)
Unnecessary complexity
The formulas in I3 and I4 use COUNTIF to do a comparisons and the add operator to check if all the required conditions are met. The same could be done in a simpler way by using comparison operators and the boolean functions. While complex ways to do things could work, when something fails, one thing to try is to reduce the complexity.
The following formula is equivalent to the I3 formula but "simpler" (from a "programming" point of view):
=IF(AND(D3<"9:31",E3>65,F3>65,G3>11,H3<"10:01"),"P","F")
The formula used to correctly display the data is as follows:
=IF(B3=ʺEODʺ,IF(AND(D3<ʺ12:30ʺ,E3>50,F3>50,G3>6,H3<ʺ12:30ʺ),ʺPʺ,ʺFʺ),IF(B3=ʺSOʺ,IF(AND(D3<ʺ12:30ʺ,E3>50,F3>50,G3>10,H3<ʺ10:30ʺ),ʺPʺ,ʺFʺ),IF(B3=ʺSBʺ,IF(AND(D3<ʺ13:00ʺ,E3>50,F3>50,G3>6,H3<ʺ12:00ʺ),ʺPʺ,ʺFʺ),IF(B3=ʺNDʺ,IF(AND(D3<ʺ12:30ʺ,E3>50,F3>50,G3>6,H3<ʺ12:30ʺ),ʺPʺ,ʺFʺ),IF(B3=ʺAWʺ,IF(AND(D3<ʺ12:00ʺ,E3>42,F3>50,G3>4,H3<ʺ12:00ʺ),ʺPʺ,ʺFʺ))))))
It should be noted that the formula was not typed by me personally, it was added to a copy of my sample spreadsheet. When attempting to copy and paste from the copy into my spreadsheet, there was an unknown error with the transfer and although the formula appeared to be written identically, it would not work.
I hand typed it character by character and it then worked correctly.
I don't have an explanation for this but should anyone run into a similar issue, there's the fix.
Best Answer
The arguments of
COUNTIFS
must alternate between ranges and conditions applied to those ranges. The condition "not blank" is expressed as "<>". (And "is blank" would be "=". In the context of this command, the lack of a thing to compare to is understood as comparing to empty string.)Remarks
ISEMPTY()
is not a supported function in Google Sheets. By the other hand, similar functions likeISBLANK()
require a value, not a range/array as an argument.References