View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default If then with wrong return value

Another one...

Assuming the value of H8 is *always* a positive number:

=LOOKUP(H8,{0,11,21,31,41,81},{3.4,2.7,2.3,2,1.8,1 .5})

If H8 is empty the formula will return 3.4.

To prevent that:

=IF(COUNT(H8),LOOKUP(H8,{0,11,21,31,41,81},{3.4,2. 7,2.3,2,1.8,1.5}),"")


--
Biff
Microsoft Excel MVP


"Clark" wrote in message
...
This If-Then will only return "0" or "3.4" depending upon the contents of
H8.
How do I modify it to give me the number I want based upon the contents of
H8?

=IF(H8<=10,3.4,IF(H8=10<=20,2.7,IF(H820<=30,2.3, IF(H830<=40,2,IF(H840<=80,1.8,IF(H880,1.5,))))) )