Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Assigning a value to a set of numbers

I am looking to create a formula that will give a certain range of numbers a
specific value. For example:

If the number falls between 248 and 258 then give it a value of 4.5
If the number falls between 241 and 247 then give it a value of 4
If the number falls between 230 and 240 then give it a value of 3.5
If the number falls between 220 and 229 then give it a value of 3
If the number falls between 209 and 219 then give it a value of 2.5
If the number falls between 198 and 208 then give it a value of 2

and so forth.

Any assistance with this problem would be greatly appreciated


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Assigning a value to a set of numbers

Try something like this:

Put this table of values in A1:C6
198 208 2.0
209 219 2.5
220 229 3.0
230 240 3.5
241 247 4.0
248 258 4.5

Next....
put this formula in F1
=VLOOKUP(E1,$A$1:$C$6,3,1)
(it will initially display #N/A)

Last...enter a number in E1...The formula in F1 will assign it a value.

Example:
E1: 215
F1: displays 2.5

Is that something you can work with?
Post back with any questions.
***********
Regards,
Ron

XL2002, WinXP


"urrbie" wrote:

I am looking to create a formula that will give a certain range of numbers a
specific value. For example:

If the number falls between 248 and 258 then give it a value of 4.5
If the number falls between 241 and 247 then give it a value of 4
If the number falls between 230 and 240 then give it a value of 3.5
If the number falls between 220 and 229 then give it a value of 3
If the number falls between 209 and 219 then give it a value of 2.5
If the number falls between 198 and 208 then give it a value of 2

and so forth.

Any assistance with this problem would be greatly appreciated


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Assigning a value to a set of numbers

This can be easily done using VLOOKUP to a table containing two
columns: the minimum of the banding and the band. Most times VLOOKUP is
used with the FALSE range_lookup for an exact match. This is the one
rare use where TRUE range_lookup can be used. In this case if an exact
match is not found, the next largest value that is less than
lookup_value is returned.

Set up a lookup table like this in two columns...

1
1.5
198 2
209 2.5
220 3
230 3.5
241 4
248 4.5


You'll have to fill in the min values for bands 1 and 1.5.

And write the lookup as VLOOKUP(lookup_value,table_array,2,TRUE)

Regards,

Leslie Bantleman


urrbie wrote:
I am looking to create a formula that will give a certain range of numbers a
specific value. For example:

If the number falls between 248 and 258 then give it a value of 4.5
If the number falls between 241 and 247 then give it a value of 4
If the number falls between 230 and 240 then give it a value of 3.5
If the number falls between 220 and 229 then give it a value of 3
If the number falls between 209 and 219 then give it a value of 2.5
If the number falls between 198 and 208 then give it a value of 2

and so forth.

Any assistance with this problem would be greatly appreciated


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 252
Default Assigning a value to a set of numbers

If you don't want to use a table in your sheet, then you can use the
following formula which is similar to what you have already been given. The
only difference is the table has been "imbeded" in the formula itself.

=VLOOKUP(A1,{198,2;209,2.5;220,3;230,3.5;241,4;248 ,4.5},2)

The best solution would be to come up with a mathematical formula, but we
would need to know where your numbers are coming from. They seem random to
me.

"urrbie" wrote:

I am looking to create a formula that will give a certain range of numbers a
specific value. For example:

If the number falls between 248 and 258 then give it a value of 4.5
If the number falls between 241 and 247 then give it a value of 4
If the number falls between 230 and 240 then give it a value of 3.5
If the number falls between 220 and 229 then give it a value of 3
If the number falls between 209 and 219 then give it a value of 2.5
If the number falls between 198 and 208 then give it a value of 2

and so forth.

Any assistance with this problem would be greatly appreciated


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Assigning a value to a set of numbers

This can be easily done using VLOOKUP to a table containing two
columns: the minimum of the banding and the band. Most times VLOOKUP is
used with the FALSE range_lookup for an exact match. This is the one
rare use where TRUE range_lookup can be used. In this case if an exact
match is not found, the next largest value that is less than
lookup_value is returned.

Set up a lookup table like this...

1
1.5
198 2
209 2.5
220 3
230 3.5
241 4
248 4.5


You'll have to fill in the min values for bands 1 and 1.5.

And write the lookup as
VLOOKUP(lookup_value,table_array,col_index_num,TRU E)

Regards,

Les Bantleman



urrbie wrote:
I am looking to create a formula that will give a certain range of numbers a
specific value. For example:

If the number falls between 248 and 258 then give it a value of 4.5
If the number falls between 241 and 247 then give it a value of 4
If the number falls between 230 and 240 then give it a value of 3.5
If the number falls between 220 and 229 then give it a value of 3
If the number falls between 209 and 219 then give it a value of 2.5
If the number falls between 198 and 208 then give it a value of 2

and so forth.

Any assistance with this problem would be greatly appreciated




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Assigning a value to a set of numbers

This can be easily done using VLOOKUP to a table containing two
columns: the minimum of the banding and the band. Most times VLOOKUP is
used with the FALSE range_lookup for an exact match. This is the one
rare use where TRUE range_lookup can be used. In this case if an exact
match is not found, the next largest value that is less than
lookup_value is returned.

Set up a lookup table like this...

1
1.5
198 2
209 2.5
220 3
230 3.5
241 4
248 4.5


You'll have to fill in the min values for bands 1 and 1.5.

And write the lookup as VLOOKUP(lookup_value,table_array,2,TRUE)

Regards,

Leslie Bantleman


urrbie wrote:
I am looking to create a formula that will give a certain range of numbers a
specific value. For example:

If the number falls between 248 and 258 then give it a value of 4.5
If the number falls between 241 and 247 then give it a value of 4
If the number falls between 230 and 240 then give it a value of 3.5
If the number falls between 220 and 229 then give it a value of 3
If the number falls between 209 and 219 then give it a value of 2.5
If the number falls between 198 and 208 then give it a value of 2

and so forth.

Any assistance with this problem would be greatly appreciated


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
Replace Old Part Numbers with New Part Numbers in a Macro. Jeffery Keown Excel Discussion (Misc queries) 5 October 17th 06 03:45 PM
conditional formatting Lofty Excel Worksheet Functions 7 July 10th 06 09:06 PM
How to generate sets of random numbers without having duplicates William Excel Worksheet Functions 1 June 6th 06 05:30 AM
Assigning numbers to names Levi Excel Discussion (Misc queries) 1 May 4th 06 10:35 PM
Why are 1/2 my numbers imported as text and the rest as numbers? KBear Excel Discussion (Misc queries) 2 April 21st 06 01:40 PM


All times are GMT +1. The time now is 02:25 PM.

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"