This is related to a question I asked earlier. My original code used
After some trouble shooting on a weird looking plot, I found that when I went back to clear the data, it was missing some rows because the first column was blank but there was data in the second and third columns. This data wasn't deleted and kept getting carried over (and counted repeatedly in a later function). So I changed the code to
which solves my original problem. I moved the reference to the column that will ALWAYS have the most data in it.
So I am curious, just for future reference, what if you don't know which column will be the longest? Would the best way be to count the data in each column to find the longest, then set the dynamic range to reference that column?
This doesn't apply to anything I am doing, but as I was testing and reviewing my coding, it made me wonder how to handle that issue if I needed to. The workbook I am posting has the original data I was working with, which has three columns of varying length data-just something to illustrate the question.
Bookmarks