View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
cabana_boy via OfficeKB.com cabana_boy via OfficeKB.com is offline
external usenet poster
 
Posts: 10
Default help with an if statement

Works perfectly, thanks!!!

Greg Wilson wrote:
Each of the 4 parts of your formula can return empty string ("") which is
text, not zero. You then try to take the average by summing the 4 parts and
dividing by 4. This returns the #Value error since you can't add text to
numbers. Also, in the below snippet, note that C2 has already been tested for
if it is < 85. So it's logically not necessary to retest if it is =85. Same
applies to the 94. All 4 parts of your formula do similar.

Formula snippet:
IF(C2<85,1,IF(AND(C2=85,C2<=94),2,IF(C294,3,"" )))


Suggested formula:

=(IF(AND(B2-821524.12, B2<866503.73), 1, IF(AND(B2=-912804.58,
B2<=962781.92), 2, 3))+IF(C2<85, 1, IF(C2<=94, 2, 3))+IF(D2<48, 1, IF(D2<=53,
2, 3))+IF(E2<19, 3, IF(E2<=21, 2, 1)))/4

Greg


--
Message posted via http://www.officekb.com