ERROR.TYPE function doesn't work as shown in help example!
Posted by Jeff Williams on August 01, 2000 7:03 PM
Any suggestions and or solutions will be appreciated! I am building a spreadsheet to calculate the number of days between two dates, and then divide an absolute cell reference (the number 6) by the result (elapsed # of days). The first date, in cell C26, is the data entry date of a client's info (expressed as 7/2/00). The second date, in cell F26 is the outcome date; i.e.; the date the client responded to a survey (expressed as 7/2/00). In this case the data was entered and the survey was taken the same day, which returned the result of zero in cell J26. (The formula in J26 was =F26-C26.) The next formula, in cell N26, is =$A$2/J26, which is designed to tell me the average number of attempts that were made per day to survey the client, compared against the minimum standard of 6 attempts over 3 days. (The number in $A$2 is 6, which is the number of required attempts over 3 days. The number in J26 is the elapsed number of days.) If you try the preceding you will find that the result returned to cell N26 is the error message #DIV/0!, which prevents me from summing the column of data using the formula =SUM(N4:N501) in cell N502. (The result returned in cell N502 will also be #DIV/0!)
In an effort to get around this problem I followed the syntax that the Excel Help example provides if you type in the key words "#DIV/0!" then choose ERROR.TYPE. My intention was to use the "O" column to store the results of the example formula: IF(ERROR.TYPE(N26)=2,.5,N26). In the case I have laid out this formula was entered into cell O26, and it worked! The result returned to O26 was ".5", which is my way of allowing for the occurrence of the survey being taken on the same day as the data was entered. (The logic is that even though the "Days Between Dates" formula (in cell J26) returns a value of zero, the data was actually entered a few hours before the survey was taken, so it is reasonable to assign a value of one-half a day whenever a zero results.)
The MAIN PROBLEM is that the formula IF(ERROR.TYPE(N26)=2,.5,N26) DOES NOT WORK AS SHOWN IN THE MICROSOFT EXCEL HELP EXAMPLE when the value in the cell is anything other than "#DIV/0!". On the very next row of my spreadsheet the data is as follows: the first date, in cell C27, is the data entry date (expressed as 7/3/00). The second date, in cell F2 is the outcome date (expressed as 7/8/00). In this case the data was entered and the survey was taken 5 days later, which returned the result of "five" in cell J27. (The formula in J27 was =F27-C27.) The next formula, in cell N27, is =$A$2/J27, which again is designed to tell me the average number of attempts that were made per day to survey the client, compared against the minimum standard of 6 attempts over 3 days. This time, however, the result is "1.2" average attempts made per day. The MICROSOFT EXCEL HELP example formula, IF(ERROR.TYPE(N27)=2,.5,N27) should return the value of 1.2 which resides in cell N27, BUT INSTEAD RETURNS THE RESPONSE: #N/A, THUS SCREWING UP MY PLAN TO OBTAIN A COLUMN OF SUMMABLE NUMBERS WHICH I COULD THEN AVERAGE TO OBTAIN THE TRUE AVERAGE NUMBER OF ATTEMPTS PER DAY TO SURVEY ALL OF THE CLIENTS IN THIS ACCOUNT! This time, using the formula =SUM(O4:O501) in cell O502 results in the error message "#N/A" being returned in cell O502!
After 10 grueling hours trying to solve this problem, I am at wit's end! Either the syntax in the MICROSOFT EXCEL HELP example is wrong, or I am missing some important clues! Has anybody else run into this type of problem? Is there another way around the dreaded "#DIV/0!" error message, or some way to make a formula ignore this message when using the SUM function to sum a column? Please e-mail me so I can sleep at night! Thank you for accepting this challenge.