MercSKelley
Technical User
I need to set an active cell for a loop function. The problem is that the cell I need to start with can vary depending on the output of data from a database. For example the output starts at cell G44. From G44 there can be from 0 to 100 cells of data. The only data that I need is the last 10 cells. I have it functioning if there are at least 10 cells of data from G44 with an End(xlToRight) statement. I then offset my activcell (0,-9). The problem is when there is only 1 to 9 cells worth of data, it offsets back past G44. Is there a simple if then statement or something I can use to when there are less than 10 cells of data. Thanks