Thanks Leo, but the output should be whats indicated on column E and column F, the only given data is column A B C.