ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Converting values to text (https://www.excelbanter.com/new-users-excel/205077-converting-values-text.html)

Keith Rathband

Converting values to text
 
I have a load of values which i want to convert to text, the text will
depend on the value. ie

If value=1, text = DOG
If value=2, text = CAT
If value=4, text = PIG

Thanks.




Barb Reinhardt

Converting values to text
 
I think what you'll need is the VLOOKUP function

http://www.mvps.org/dmcritchie/excel/vlookup.htm
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"Keith Rathband" wrote:

I have a load of values which i want to convert to text, the text will
depend on the value. ie

If value=1, text = DOG
If value=2, text = CAT
If value=4, text = PIG

Thanks.





Mike H

Converting values to text
 
Vlookup is probably the best but consider this as well for up to 29 options

=CHOOSE(A1,"Cat","Dog","Pig","Giraffe","Wombat","A ardvark","Guineafowl")

Mike

"Keith Rathband" wrote:

I have a load of values which i want to convert to text, the text will
depend on the value. ie

If value=1, text = DOG
If value=2, text = CAT
If value=4, text = PIG

Thanks.





Gord Dibben

Converting values to text
 
=LOOKUP(A1,{1,2,3,4,5},{"Dog","Cat","Rat","Pig","D ugong"})


Gord Dibben MS Excel MVP

On Sat, 4 Oct 2008 20:26:42 +0100, "Keith Rathband"
wrote:

I have a load of values which i want to convert to text, the text will
depend on the value. ie

If value=1, text = DOG
If value=2, text = CAT
If value=4, text = PIG

Thanks.





All times are GMT +1. The time now is 04:04 AM.

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