ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Compare and replace values (https://www.excelbanter.com/excel-programming/302232-compare-replace-values.html)

Bastet

Compare and replace values
 
Hello,

Here is my problem. I've got a set of values in one excel sheet (th
results of a survey), some columns represents the results of a choic
in a list of checkbox.

Here is my checkbox list :

1. Toto
2. Tata
3. Titi

My result file give me the position number 1, 2, 3 instead of the tex
value toto, tata, titi. And I can't change anything in the form tha
give this result.

So, what I want to do, is to replace the 1, 2, 3 by their text value
in excel.

I've got a sheet with my imported data results, and a sheet with th
list of my checkbox choice (one column with the text, one column wit
the corresponding number).


How can I parse my results sheet, to replace the numbers with th
correponding text ? Any function doing that ? Or macro ?

Ok, it's working with a long "IF" function, but it's not reusable a
all if I change the number of checkbox choice (for an other survey
with the same kind of template), etc.

Thanks.


Baste

--
Message posted from http://www.ExcelForum.com


Papou

Compare and replace values
 
Hi Bastet
=CHOOSE(A1,"Toto","Tata","Titi")

HTH
Cordially
Pascal

"Bastet " a écrit dans le message de
...
Hello,

Here is my problem. I've got a set of values in one excel sheet (the
results of a survey), some columns represents the results of a choice
in a list of checkbox.

Here is my checkbox list :

1. Toto
2. Tata
3. Titi

My result file give me the position number 1, 2, 3 instead of the text
value toto, tata, titi. And I can't change anything in the form that
give this result.

So, what I want to do, is to replace the 1, 2, 3 by their text value,
in excel.

I've got a sheet with my imported data results, and a sheet with the
list of my checkbox choice (one column with the text, one column with
the corresponding number).


How can I parse my results sheet, to replace the numbers with the
correponding text ? Any function doing that ? Or macro ?

Ok, it's working with a long "IF" function, but it's not reusable at
all if I change the number of checkbox choice (for an other survey,
with the same kind of template), etc.

Thanks.


Bastet


---
Message posted from http://www.ExcelForum.com/




Bastet[_2_]

Compare and replace values
 
Great, thanks :)

Is there a way to replace CHOOSE(A1, *"Toto","Tata","Titi" *) b
something like CHOOSE(A1, *Name of a column or an area*) ?

Because my list of choice can be quite long and change from a survey t
an other

--
Message posted from http://www.ExcelForum.com


Papou

Compare and replace values
 
With YourList named range referring to, well, your list:
=INDEX(YourList,A1)

Cordially
Pascal

"Bastet " a écrit dans le message de
...
Great, thanks :)

Is there a way to replace CHOOSE(A1, *"Toto","Tata","Titi" *) by
something like CHOOSE(A1, *Name of a column or an area*) ?

Because my list of choice can be quite long and change from a survey to
an other.


---
Message posted from http://www.ExcelForum.com/




Bastet[_3_]

Compare and replace values
 
Many thanks for your help. It's exaclty what I was looking for

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 05:36 PM.

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