Good day,
I have the following loop:
Basically I want the Variable E_FACH1 (which is empty at that point) the get the Value of ENG`j', when the variable A120_0`j' has the value 2. If that is the case, the second replace line should run, but without the `j' which equaled 2 in the first replace command (otherwise all Variables E_FACH would have the same value). That is obviously not the right Code for it, but I am struggling to find a way to do it.
Any help is appreciated- if you do not understand my question, let me know. I'll try to clarify it.
Best,
Marius
I have the following loop:
Code:
forval j = 1/10 { replace E_FACH1 = ENG`j' if A120_0`j' == 2 & A120 = 1 replace E_FACH2 = ENG`j' if A120_0`j' == 2 & A120 = 1 replace E_FACH3 = ENG`j' if A120_0`j' == 2 & A120 = 1 }
Any help is appreciated- if you do not understand my question, let me know. I'll try to clarify it.
Best,
Marius
Comment