Sorry for my mistake. I don't want the cells to show the formula. what I really want is cell D1 to show "M" and cell E1 to show "N". In other words, I want to copy the formula along one line and the formula must show the data across column A.
I'm trying to test your formula, but I'm afraid the language of my Excell (portuguese) neither recognize the 'column' input nor has an equivalent input. Or I can not find it. I'm trying to solve this my new problem and then I'll come back to you.