Hello everyone,
I have a column with values either 0 or 1. Everytime there is one or more 0 below together, I need them to be replaced with increasing values by 1 and do not change the lines with previous 1. Like this:
Do you have any ideas? It needs to be done due to logistics reasons where adjacent zeroes represent a new line with another product of the same order, just for your information.
I will be greatful for your help.
Tony
I have a column with values either 0 or 1. Everytime there is one or more 0 below together, I need them to be replaced with increasing values by 1 and do not change the lines with previous 1. Like this:
1 | 1 /*no change | |
1 | 1 /*no change | |
0 | 1 /*+1 | |
1 | transform into -> | 1 /*no change |
0 | 1 /*+1 | |
0 | 2 /*+2 (or previous cell +1) | |
0 | 3 /* +3 (or previous cell +1) | |
1 | 1 /* no change |
Do you have any ideas? It needs to be done due to logistics reasons where adjacent zeroes represent a new line with another product of the same order, just for your information.
I will be greatful for your help.
Tony