categorical variable

  • Thread starter Thread starter Omar
  • Start date Start date
O

Omar

Dear Experts,
If I have a categorical variable (1 and 2), how can I inform excel
that 1 means Male and 2 means Female?
Thanks.
 
With an IF statement.

dim myVar as long
dim myStr as long

myVar = 1

if myvar = 1 then
mystr = "Male"
else
mystr = "Female"
end if

====
assumes that there are only two options for that variable.
 
My fingers not typing what brain is thinking again - perhaps yours
also<bg>


=If(A1=1,"Male",if(A1=2,"Female",""))
 
Back
Top