not sure how to finish the algorithm vb code.
First complete a detailed verbal algorithm. only then start to think about code