Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
tjb
 
Posts: n/a
Default nesting if statements

OK let me try to explain this one...

Cell A1 has a number between 0 and 75.

Cell A2 needs to have some nested If statements that reflect the following:
If A1 is between 2 and 4 then A2 should read 80
If A1 is between 5 and 14 then A2 should read 120
If A1 is between 15 and 24 then A2 should read 160
If A1 is 25 and higher then A2 should read 200
  #2   Report Post  
Domenic
 
Posts: n/a
Default

Try...

=LOOKUP(A1,{2,5,15,25},{80,120,160,200})

Hope this helps!

In article ,
tjb wrote:

OK let me try to explain this one...

Cell A1 has a number between 0 and 75.

Cell A2 needs to have some nested If statements that reflect the following:
If A1 is between 2 and 4 then A2 should read 80
If A1 is between 5 and 14 then A2 should read 120
If A1 is between 15 and 24 then A2 should read 160
If A1 is 25 and higher then A2 should read 200

  #3   Report Post  
Biff
 
Posts: n/a
Default

Hi!

A couple of questions:

What if A1 is <=2 ?

between 2 and 4
between 5 and 14
between 15 and 24


Do you really mean:

=2 and <=4
=5 and <=14
=15 and <=24


Biff

"tjb" wrote in message
...
OK let me try to explain this one...

Cell A1 has a number between 0 and 75.

Cell A2 needs to have some nested If statements that reflect the
following:
If A1 is between 2 and 4 then A2 should read 80
If A1 is between 5 and 14 then A2 should read 120
If A1 is between 15 and 24 then A2 should read 160
If A1 is 25 and higher then A2 should read 200



  #4   Report Post  
TN.Jim
 
Posts: n/a
Default

=IF(AND(A12,A1<4),80,IF(AND(A15,A1<14),120,IF(AN D(A115,A1<24),160,IF(A125,200))))

Yoou used "between" and so that is how I set up the formulas...
In other words, the following inputs in A2 give the following results:
1 = FALSE
2 = FALSE
3 = 80

You may want to set up a table that allows you to link the formulas so that
you can easliy change the values...

Jim

"tjb" wrote:

OK let me try to explain this one...

Cell A1 has a number between 0 and 75.

Cell A2 needs to have some nested If statements that reflect the following:
If A1 is between 2 and 4 then A2 should read 80
If A1 is between 5 and 14 then A2 should read 120
If A1 is between 15 and 24 then A2 should read 160
If A1 is 25 and higher then A2 should read 200

  #5   Report Post  
dominicb
 
Posts: n/a
Default


Good evening tjb

You haven't indicated wha is to happen if the number in cell A1 is 0 or
1 - in the example below, 0 is returned. Other than that I think it
covers your requirements.

=IF(A1=25,200,IF(A1=15,160,IF(A1=5,120,IF(A1=2 ,80,0))))

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=466423



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
Logical ELSE statements Ruth Excel Discussion (Misc queries) 2 June 23rd 05 03:23 PM
Nesting more than nine IF statements in Excel Alexander Walsh via OfficeKB.com Excel Worksheet Functions 13 June 1st 05 06:31 PM
Nesting IF Statements Based on Same Cell Value Cheryl B. Excel Worksheet Functions 4 May 26th 05 08:24 PM
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM
If statements Mark Excel Worksheet Functions 3 November 2nd 04 08:39 PM


All times are GMT +1. The time now is 09:59 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"