I have data in the form of four columns. The first three columns represent time, value1, value 2. The fourth column is binary, all 0’s or 1’s. Is there a way to tell excel to delete time, value1 and value 2, when the corresponding binary value in column four is 0? I know this is a lot easier in C++ or matlab, but for reasons beyond my control, I must do it in excel.
Share
My Visual Basic is a bit rusty, but this macro will do it. Just fire up the VBA editor (Shift+F11), insert a new module (if there isn’t one), and add the following code. Then make sure that the table you want to clean is on the active sheet go somewhere inside of the code and press the run button (F5) in the VBA editor. Then all lines with
0in the D column should be gone.