Forum Discussion

DaceC335's avatar
DaceC335
Copper Contributor
May 17, 2024

text coding to number

Hello,

i have a lot of similar text (like yes and no) and each yes i would like to code with number 1, and no with number  2. Could you help me please?

9 Replies

  • DaceC335 

     

    Something like creating a column next to these texts and generate 1 if "yes" and 2 if "no"?

     

    Assuming your text range is from A1:A50:

     

    On B1 type =IFERROR(IFS(A1="Yes",1,A1="No",2),"")

    Then fill down until B50

    • DaceC335's avatar
      DaceC335
      Copper Contributor
      Thank you Martin for reply.
      My goal is not to change the text to value in a different column, but in the entire sheet or cell containing Yes or No words.
      • DaceC335's avatar
        DaceC335
        Copper Contributor
        like i have yes in A1:A20 that the value 1 appears from A1:A20

Resources