function for converting numeric data to words

Tags:
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #582 Score: 0
    Anonymous
    Inactive

    I’m trying to change numeric data, 1, 2, -1, and blank spaces to yes, no, unsure, and ” “. I was able to do this for 1, 2, blank —> “male”, “female”, ” ” when only three values were involved by using this function

    if (variableX=1, “male,

    if (variableX=2, “female”, ” “))

     

    Not really knowing how to program functions, I tried to solve my new problem this way

    if (variableY=1, “yes”,

    if(variableY=2, “no”,

    if(variableY=-1, “unsure”, ” “)))

     

    I got an out of range error that I think was telling me I can’t have that many conditional statements.  Does anyone know how to write a function to convert anywhere from 3 to 6 numeric values into strings?  Middle school students will be working with the database, and we thought all the numbers would become a bit overwhelming, and limit their engagement with the data.

    Thanks!

    T

    #584
    Bill Finzer
    Keymaster

    Hello Traci,

    Excellent question, with what I hope you will find to be an excellent answer!

    In the first screen capture on the left you see typical survey data with Smart Phone? coded with 1, 2, or blank. On the right you see the result of dragging that attribute all the way to the left to form a group for each value as shown on the right.

    Fortunately, those values are editable! So, in the second screen capture on the left, you see the result of editing the 1’s to no and the 2’s to yes. Then, dragging the attribute back to the right flattens out the table again.

    No formulas required! I hope this makes sense.

    Bill

    p.s. I think replacing the numbers with meaningful words is an excellent idea, no matter the age of the user.

    #589
    Andee Rubin
    Participant
    4 pts

    Of course, I love this answer!!  (and, in case you hadn’t already realized this, Traci is working with me on the Data Clubs project…)

    #599
    Anonymous
    Inactive

    Thanks! I knew that but had a momentary lapse. So much easier!

    T

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.