LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default if then statements with calculations

cmac wrote...
I need to make a table that evaluates a number. *

If a number (x) is between (A) and (B), then I have to do a
calculation (C1) If a number is between (B) and (C), then I have to
do a calculation (C2) If a number is between C and D, then I have to
do a calculation (C3) If a number is greater than D, then I have to
do calculation (C4)


And if x <= A?

Brute force,

=IF(x<=A,"impossible",IF(x<=B,C1,IF(x<=C,C2,IF(x<= D,C3,C4))))

More elegant,

=CHOOSE(MATCH(x*0.999999999999999,{-1E300;A;B;C;D}),"impossible",
C1,C2,C3,C4)


 
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
Federal tax withholding calculations - using IF statements..? clintjjohnson Excel Worksheet Functions 13 April 3rd 23 04:16 PM
Calculations - Max and Min Mark M Excel Worksheet Functions 3 November 19th 07 12:48 AM
If Then Calculations Marti Excel Worksheet Functions 3 August 18th 07 05:35 AM
IRR Calculations Allan Excel Discussion (Misc queries) 5 October 22nd 06 06:17 PM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM


All times are GMT +1. The time now is 09:18 AM.

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

About Us

"It's about Microsoft Excel"