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

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
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,406
Messages
6,119,330
Members
448,888
Latest member
Arle8907

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