Assign a number to a text string.

jimleslie77

New Member
Joined
Sep 27, 2006
Messages
5
In an excel spread sheet if I type in the word "work" in col a row b, can that automatically assign the number "8" to col b row b. If so how do I do this?

Thanks
Jim
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Welcome to the board.

Not to sure what you mean by
col a row b
, but try setting B1 = IF(A1="Work",8,"") and copying the formula down.
 
Upvote 0
Hi Jim

Welcome to the Board!

Just to expand on NBVC's suggestion, if you have multiple possibilities ie Work=8, Play=6, Hiking=10 etc then you might like to use VLOOKUP instead. Eg in B2:

=VLOOKUP(A2,$D$1:$E$3,2,0)

Where D1:D3 holds Work, Play, Hiking and E1:E3 holds 8,6,10.

Best regards

Richard
 
Upvote 0

Forum statistics

Threads
1,214,321
Messages
6,118,886
Members
448,856
Latest member
Eduard_Stoo

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