ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Assigning values to words (https://www.excelbanter.com/excel-discussion-misc-queries/72496-assigning-values-words.html)

cardingtr

Assigning values to words
 

I have a drop down list of 7 phrases. How can I assign a value(1-7) on
each list so it will reflect to next cell?
Lets say the dropdown is in B2 and I want its value in C2.

Thanks.


--
cardingtr
------------------------------------------------------------------------
cardingtr's Profile: http://www.excelforum.com/member.php...o&userid=27027
View this thread: http://www.excelforum.com/showthread...hreadid=513899


DavidC

Assigning values to words
 
Hi,

If the phrases are standard and do not change, then use a simple "if"statement

If(B2="XXXX",1,if(b2="ÿyy",2,etc)

Hope this helps
regards
DavidC

"cardingtr" wrote:


I have a drop down list of 7 phrases. How can I assign a value(1-7) on
each list so it will reflect to next cell?
Lets say the dropdown is in B2 and I want its value in C2.

Thanks.


--
cardingtr
------------------------------------------------------------------------
cardingtr's Profile: http://www.excelforum.com/member.php...o&userid=27027
View this thread: http://www.excelforum.com/showthread...hreadid=513899



Gary''s Student

Assigning values to words
 
=(B2="first")*1+(B2="second")*2+(B2="third")*3 and continue for as many as
you like
--
Gary's Student


"cardingtr" wrote:


I have a drop down list of 7 phrases. How can I assign a value(1-7) on
each list so it will reflect to next cell?
Lets say the dropdown is in B2 and I want its value in C2.

Thanks.


--
cardingtr
------------------------------------------------------------------------
cardingtr's Profile: http://www.excelforum.com/member.php...o&userid=27027
View this thread: http://www.excelforum.com/showthread...hreadid=513899



Ron Coderre

Assigning values to words
 

Try something like this:

For a text value (or blank) in A1
B1: =MATCH(A1&"",{"","aaa","bbb","ccc","ddd","eee","ff f","ggg"},0)-1

Does that help?

Regards,
Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=513899


cardingtr

Assigning values to words
 

Thanks for all your suggestions. All worked. I just have to tweak it a
little.


--
cardingtr
------------------------------------------------------------------------
cardingtr's Profile: http://www.excelforum.com/member.php...o&userid=27027
View this thread: http://www.excelforum.com/showthread...hreadid=513899



All times are GMT +1. The time now is 11:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com