Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 49
Default If then with wrong return value

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,))))) )
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default If then with wrong return value

Try:

=IF(H880,1.5,IF(H840,1.8,IF(H830,2,IF(H820,2.3 ,IF(H810,2.7,3.4)))))

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"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,))))) )



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default If then with wrong return value

=IF(H8<=10,3.4,IF(H8<=20,2.7,IF(H8<=30,2.3,IF(H8<= 40,2,IF(H8<=80,1.8,1.5)))))
--
David Biddulph

"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,))))) )



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default If then with wrong return value

If the number in H8 is never negative then:
=IF(H8<=10,3.4,IF(H8<=20,2.7,IF(H8<=30,2.3,IF(H8<= 40,2,IF(H8<=80,1.8,1.5)))))
You cannot use H8=10<=20 This has to be expressed as AND(H8=10,H8<=20)
There are other formulas to do this too, but I wanted to show you with IF's,
the way you're trying to do it.

Tyro

"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,))))) )



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default If then with wrong return value

The formula will return 3.4 for negative numbers.

Tyro

"Tyro" wrote in message
...
If the number in H8 is never negative then:
=IF(H8<=10,3.4,IF(H8<=20,2.7,IF(H8<=30,2.3,IF(H8<= 40,2,IF(H8<=80,1.8,1.5)))))
You cannot use H8=10<=20 This has to be expressed as AND(H8=10,H8<=20)
There are other formulas to do this too, but I wanted to show you with
IF's, the way you're trying to do it.

Tyro

"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,))))) )







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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,))))) )



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Calculated Field (wrong Qty*Price = wrong Amount) Edmund Excel Discussion (Misc queries) 8 October 4th 07 12:13 PM
excel result return wrong calcuation result garyww Excel Worksheet Functions 1 August 14th 06 11:14 AM
return wrong result of the cell garyww Excel Worksheet Functions 1 August 14th 06 05:51 AM
excel result return wrong calcuation result garyww Excel Worksheet Functions 0 August 14th 06 05:02 AM
excel result return wrong calcuation result garyww Excel Worksheet Functions 0 August 14th 06 05:02 AM


All times are GMT +1. The time now is 05:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"