[EpiData-list] Adding values of 2 cells

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Fri Jul 11 13:38:23 CDT 2008


Assuming that v1 is defined as a string of 2 characters, v2 is a number 
of 3 digits and v3 is a string of 5 characters :

id ## v1 __ v2 ### v3 _____

do put this in the .CHK entry for V2 (using the edit button or the editor):

V2
  if v1 = . then
   v3 = "  " + v2
 else
  v3 = v1 + v2
 endif
END

You will want to see if this works for the case where you only enter one 
character in v1 or less than 3 digits for v2
That is, for v1="A" and  v2 = 21, do you want v3 = "A  21" or "A21" or 
"A 021"?
Any of these can be handled, but will need more IF statements.

Jamie

Ziad wrote:
> How can I create v3=value of v1 and value of v2?
> example:
> ID      v1    v2      v3
> ---    ---   ---     ---
> 1       BW   101     BW101
> 2       CW   102     CW102
>   



More information about the EpiData-list mailing list