HI
Kenosis thanks for your help, so from the above data file input example, then column 3 we have:
1,1,1,1,0,0,0,1,1
which the 3 zeros can get transformed to 1,1,1 because its surrounded by the same number '1' ie:
1,1,1,1,1,1,1,1,1
in the next column we have
2,2,0,0,2,2,0,1,2
only the 2 zeros in between the 2' can be changed since its surrounded by the same number '2' ie:
2,2,2,2,2,2,0,1,2
The zero at the 7th element cant be changed to zero since its surrounded by not the same number '2' and '1'
The file has dozens of columns and hundreds of rows and I have to apply this rule as I walk down each column.
The rule is to fill in zero block in each column only where the numbers before the start and after the end of the zero blocks are the same.
Thanks again for everyones help and would appreciate any code.