I have the following csv file:
name, new_name, flag
a,,0
b,,1
c,c,0
d,,1
I want to make the value in the “new_name” column become the value of the “name” column in rows where the “flag” row has a value of 1. Do I have to use an application program to do this? or is there a way of putting this equation into the “flag” column and then pasting the formula in every row in that column?
Much thanks in advance!
If you can live with a four-column setup:
then you can set
real_new_nameto the formula=IF(C2=1,A2,B2)and fill it down.Otherwise, you will need to write a script that goes through each row and acts if flag=1.