Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
categorical variable
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. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
categorical variable
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. Omar wrote: 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. -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
categorical variable
Hi
=If(A1=1,"Male,if(A1=2,"Female,"")) -- Regards Roger Govier "Omar" wrote in message oups.com... 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. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
categorical variable
Or perhaps shuffle the quote marks:
=If(A1=1,"Male",if(A1=2,"Female,")) -- David Biddulph "Roger Govier" wrote in message ... Hi =If(A1=1,"Male,if(A1=2,"Female,"")) -- Regards Roger Govier "Omar" wrote in message oups.com... 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. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
categorical variable
My fingers not typing what brain is thinking again - perhaps yours
also<bg =If(A1=1,"Male",if(A1=2,"Female","")) -- Regards Roger Govier "David Biddulph" <groups [at] biddulph.org.uk wrote in message ... Or perhaps shuffle the quote marks: =If(A1=1,"Male",if(A1=2,"Female,")) -- David Biddulph "Roger Govier" wrote in message ... Hi =If(A1=1,"Male,if(A1=2,"Female,"")) -- Regards Roger Govier "Omar" wrote in message oups.com... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot table puzzle: "Top 10" for categorical data | Excel Discussion (Misc queries) | |||
How to use excel statistics for categorical data? | Excel Discussion (Misc queries) | |||
How to plot categorical data to show confidence interval? | Excel Discussion (Misc queries) | |||
Sum cells based on a row variable and seperate column variable | Excel Worksheet Functions | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions |