Hi,
I am trying to use the value of one variable as input into devising another variable and wish to know if it is possible. For example, I have var with a value of "siccode>1239 & siccode<1400" and I wish to create a variable oil=1 if var. In other words, my goal is to create the variable oil=1 if siccode>1239 & siccode<1400. However, I am getting a type mismatch error if attempting to do this as written.
I am trying to use the value of one variable as input into devising another variable and wish to know if it is possible. For example, I have var with a value of "siccode>1239 & siccode<1400" and I wish to create a variable oil=1 if var. In other words, my goal is to create the variable oil=1 if siccode>1239 & siccode<1400. However, I am getting a type mismatch error if attempting to do this as written.
Comment