Talk:Documentation/Calc Functions/ERROR.TYPE

SF Comments

 * (1) Summary. Suggest replacing with the following – “Generates a code number representing the type of error found in the argument.”.
 * (2) Returns. Suggest replacing with the following – “Returns a positive integer ranging from 1 to 7 if the argument represents one of the specified error types. Returns the #N/A error code if the argument does not represent an error or represents an error type that has not been allocated to a code number.”
 * (3) Returns. I think that the table of possible return values would be more logically placed in this section, rather than in the Arguments section.
 * (4) Arguments. Suggest changing “whose value needs to be processed” to “which is to be mapped to a code number”. Also, change “This value is processed as follows” to “The relationship between the error type of the argument and the value returned by ERROR.TYPE is as follows:”
 * (5) Arguments, table. Please insert “(variable missing)” after “511”. Also, change the second “#N/A” in the Error value column to “Anything else”.
 * (6) Additional details. I found it hard to make much sense of this statement. Does it add anything more than is explained in the later example? If not, then I suggest it should be deleted.
 * (7) Examples. Suggest changing “More advanced way” to “More advanced usage”.
 * (8) Examples, more advanced way, Formula. Suggest changing “where in division A1 by A2, A2 can turn to zero” to “where if cell A2 contains zero, we wish to provide a suitable message to highlight the division by 0 problem”.
 * (9) Examples, more advanced way, Description. I had some problems following this text; is the following proposed replacement clearer – “The ISERROR function returns TRUE or FALSE depending on whether there is an error or not with the A1/A2 operation. If an error occurs, the outer IF function call processes its second argument; if there is no error, it processes its third argument and returns the result of the division. The second argument of the outer IF function checks the code number returned by ERROR.TYPE for the error that has occurred, and if this is equal to 2, it returns the specified text ("the denominator can't be equal to zero") or 0 (by default) otherwise. Thus, the clear text would signify the division by zero, the result of the division would appear when the division is successful, or if there is an error of another type, zero would be returned.

If the ERROR.TYPE function is used as a condition of the IF function and the ERROR.TYPE returns #N/A, the IF function returns #N/A as well. Use ISERROR to avoid it as shown in this example.”? --Stevefanning (talk) 2020-12-09T21:50:02 (UTC)