Ranges?

JoseK70

New Member
Joined
Sep 16, 2011
Messages
6
In column A I have number of people which ranges from 1 to i think the highest is 92. In column B I want to assign a value if the column A number falls within a range. Like if the value in column A falls within 1 to 6 range I want to give it a value of x in column B. If the column A value falls within a range of 7 to 15 I want to give it a value of y in column B. Anybody know how to accomplish this? <!-- / message --><!-- BEGIN TEMPLATE: ad_showthread_firstpost_sig --><!-- END TEMPLATE: ad_showthread_firstpost_sig -->
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Welcome to the board...

You can use a lookup formula...

=LOOKUP(A1,{1,7,16},{"x","y","z"})

Just keep the numbers sorted ascending from left to right.


Hope that helps.
 
Upvote 0
Thanks for responding. I have column A with values lets say 6, 4, 18, 1, 66, 23, 2, 2, 5, and so on (they need to stay in that order). In column B I want .8 if the column A value falls in the 1 to 6 range, 1 if the column A value falls in the 7 to 15 range, and 1.2 if the column A value is 16 or higher. Thanks for the help.







Welcome to the board...

You can use a lookup formula...

=LOOKUP(A1,{1,7,16},{"x","y","z"})

Just keep the numbers sorted ascending from left to right.


Hope that helps.
 
Upvote 0
Instead of
=LOOKUP(A1,{1,7,16},{"x","y","z"})
try
=LOOKUP(A1,{1,7,16},{0.8,1,1.2})
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,704
Members
452,938
Latest member
babeneker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top