excel - Counting different categories in a column -
i working excel vba. have database of columns different numerical values. example, column people's ages , number of kids. being asked classify variables in 2 groups:
if there more 10 different values, it's continuous variable. if there 10 or less different values, it's categorical variable.
also, there blank cells in-between data doesn't count.
can me identifying type of variable is?
thanks
edit: exercise longer that. there 3 kind of variables, text , numerical(continuous , categorial) , need identify type of column variable belongs , copy column name 1 place list of variables.. i've figured out how differ between text , numerical. need figure out how between numerical continuous , categorical.
this part of data:
this work far
sub tarea() set origen = workbooks("data.xls").sheets(1) set destino = workbooks("t01.xlsm").sheets(1) = 0 texto = 0 numero = 0 while origen.[b2].offset(0, i) <> "" fila = 0 until origen.[b3].offset(fila, i) <> "" fila = fila + 1 loop if isnumeric(origen.[b3].offset(fila, i)) = false destino.[b4].offset(texto, 0) = origen.[b2].offset(0, i) texto = texto + 1 else: destino.[c4].offset(numero, 0) = origen.[b2].offset(0, i) numero = numero + 1 end if = + 1 wend end sub
Comments
Post a Comment