I don't know enough about what you're trying to do; I answered the question for the data you provided. Can you not change the references if the data ends in a different row?