IF Statement, convert...

excelbetter

Board Regular
Joined
Oct 13, 2010
Messages
190
If I have a bunch of numbers in Column A, all between the value of 1 - 10, how can I in Column B covert the # in Column A if the number is a specific number?

For example:

- If the number in column A is a 9 or 10, I want the number in column B to be a 10;

- If the number in column A is a 7 or 8, I want the number in column B to be a 1;

- If the number in column A is 1 through 6, I want the number in column B to be a 0;

Thanks.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Try:
Code:
[TABLE="width: 176"]
<colgroup><col width="176"></colgroup><tbody>[TR]
   [TD="width: 176"]=IF(A1<7,0,IF(A1<9,1,10))[/TD]
 [/TR]
</tbody>[/TABLE]
 
Upvote 0
base on your condition above the if statement should work. post2
another approach is =LOOKUP(A1,{0,7,9},{0,1,10}) ->change the numbers inside the braces to suit.
 
Upvote 0
I would stick with vlady formula, but IF works when I try it.

Excel Workbook
ABC
110
220
330
440
550
660
771
881
9910
101010
11
Sheet1
 
Upvote 0

Forum statistics

Threads
1,214,659
Messages
6,120,786
Members
448,994
Latest member
rohitsomani

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