#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default If Statements

I need a statement that will allow me to get answer based on a certain criteria
I have a column of answers ranging from -400 to 400. Now I need a certain
range of numbers to be changed into one value.
< -150 has to come as a -2

150 to -20 has to come up at a -1

20 - 150 has to come up as a 0

150 - 250 has to come up as a1

250 has to come up as a 2


I want the single integars in a column right beside the larger number.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default If Statements

Perhaps the following will meet your needs:

=LOOKUP(A1,{-400,-150,-20,150,250},{-2,-1,0,1,2})


< -150 has to come as a -2
150 to -20 has to come up at a -1
20 - 150 has to come up as a 0
150 - 250 has to come up as a1
250 has to come up as a 2


I assume you mean -150 to -20 becomes -1, and -20 to 150 becomes 0. I also
assume you mean =250 becomes 2; and I assume that "N to M" means =N to <M
("N up to, but not including M").


I want the single integars in a column right beside the larger number.


If the "larger number" is in A1, the formula goes into B1. If the column of
"larger numbers" is in A1:A100, you can simply copy B1 down through B100,
and the reference to A1 will automagically change to A2, A3, etc.


----- original message -----

"Shortstopper00" wrote in message
...
I need a statement that will allow me to get answer based on a certain
criteria
I have a column of answers ranging from -400 to 400. Now I need a certain
range of numbers to be changed into one value.
< -150 has to come as a -2

150 to -20 has to come up at a -1

20 - 150 has to come up as a 0

150 - 250 has to come up as a1

250 has to come up as a 2


I want the single integars in a column right beside the larger number.


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
if- then statements Paul Excel Worksheet Functions 7 February 21st 09 01:06 AM
IF statements profmorse Excel Discussion (Misc queries) 5 December 20th 06 07:41 PM
IF Statements Rebecca Excel Worksheet Functions 1 December 5th 06 05:09 PM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
If statements paule1982 Excel Discussion (Misc queries) 4 February 18th 06 05:09 PM


All times are GMT +1. The time now is 08:41 AM.

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"