Trouble is, I don't know what values (cell ranges) you are putting in for each of the Input Boxes so I can't step through.

I also don't know what you expect to see for a given range of cells based on what you enter.