Thanks for your inputs, Special-K. Actually, I meant to put the D in cell C7. I would like to look at the array and generate the output as in:
A 1
G 2

What would be a good way to work with array? Thank you in advance.