I have some problem about writing an if statement in WNL.
There are two columns 1 and 2 (c1 and c2). I want to add a new column 3 (c3), if the c1 value is empty, then the value of c3 is also empty, otherwise, the value of c3 equals to that of c2.
I tried if(c1=“NULL”,“NULL”,c2) but the result is that C3=C2, no empty cells.
How to write the if statement? Would someone help me? Thank you!
Thank you for your reply. My first post may be a little confusing. Please see more detail below.
Before the descriptive stats, I have to exclude some cells from column 2 using Data Wizard–>transformation–>custom. The excluding rule is that for each subject, when the c1 value is empty, the c3 is also empty, otherwise the c3 value equals to c2 value.
I can understand your statement above but it can be used in the Data Wizard as well?
I also tried if(c1=0,“NULL”,c2) but the result is still C3=C2, no empty cells.
This if statement works in Excel. The C3 is NULL when C1 is empty.
The if statement in excel is different from that in WNL?