OK, I kind of get what you are wanting. 2 questions:
1) Is the example sheet what you have, or what you want?
2) What do you want returned to the cells in column E?