convert cell with text to another cell with number (excel)

Kwnstantinos_M

New Member
Joined
Jun 12, 2018
Messages
24
Hello,

In my excel sheet I have a list of text values, namely the first letter of wind directions. So I have something like this:
A
B
SE
NNW
N
N
NNW
S

<tbody>
</tbody>

I want each text ( for instance SE) from column A to correspond to a numerical value. For instance "SE" to 135, "NNW" to 22,5 etc. I need a command which includes all text values and corresponds them with specific numerical values in order to autofill the list B. I tried if command but I didn't make it.. Thank you in advance
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi, how will you know SE is always 135? You would need to build a list then you could reference it with index and match function.
 
Upvote 0
Hi,

Build a Table with All the different values like my sample D1:E4, then you can use VLOOKUP, or INDEX/MATCH suggested by Roderick_E:


Book1
ABCDE
1SE135SE135
2NNW22.5NNW22.5
3N10N10
4N10S180
5NNW22.5
6S180
Sheet78
Cell Formulas
RangeFormula
B1=VLOOKUP(A1,D$1:E$4,2,0)


Formula copied down.
 
Last edited:
Upvote 0
You're welcome, welcome to the forum.
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,793
Members
449,048
Latest member
greyangel23

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