Hi All,
I had already built in the formula in the ColumnC before. Now, I would like to insert the formula by VBA method. The formula format is depended on the cell whether is merged.
Pattern:
(i). C2 is single cell
C2 =IF(BinStr2HexStr(CONCATENATE(RC[6]))=RC[-1],"",BinStr2HexStr(CONCATENATE(RC[6])))
(ii). C3 is merged with C4. (i.e. 2 cells are merged)
C3 =IF(BinStr2HexStr(CONCATENATE(R[1]C[6],RC[6]))=RC[-1],"",BinStr2HexStr(CONCATENATE(R[1]C[6],RC[6])))
(iii). C5 is merged with C6,C7. (i.e. 3 cells are merged)
C5 =IF(BinStr2HexStr(CONCATENATE(R[2]C[6],R[1]C[6],RC[6]))=RC[-1],"",BinStr2HexStr(CONCATENATE(R[2]C[6],R[1]C[6],RC[6])))
… upto n cells are merged.
Note BinStr2HexStr is my self-defined function.
Thanks,
Ann