Formula Help

ststern45

Well-known Member
Joined
Sep 17, 2005
Messages
961
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hi everyone,

My question is as follows:

I want to convert digits to a single value.

For example,
If a value in cell A1 equals:
digits 0 or 1 to value of 0
digits 2 or 3 to value of 1
digits 4 or 5 to value of 2
digits 5 or 7 to value of 3
digits 8 or 9 to value of 4

So if the value in cell A1 = 0 or 1 then the value = 0 in cell B1
if the value in cell A1 =8 or 9 then the value = 4 in cell B1

Thanks in advance!!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Try this. assuming there are no negative values as this will return 0
=IF(A1<=1,0,IF(A1<=3,1,IF(A1<=5,2,IF(A1<=7,3,IF(A1<=9,4)))))
 
Upvote 0
Thanks that worked.
I also found this formula INT(A1*.5)
Thnaks for all your help!!
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,199
Members
449,072
Latest member
DW Draft

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