Hi Folks,
I have a formula that counts how many rows there are in cell A, then fills the rest of the columns down to match. It works using the "selectionchange" part of the worksheet, and executes perfectly 99% of the time.
Unfortunately, there is a program that fills the data in column A and sometimes the rows in A decrease, but the macro still fills down to the old number of rows, causing excel to divide by zero a few dozen times and crash.
So is there a way that I can have it fill down ONLY if the row is not empty? The code is below
I think I need something just before the![]()
Please Login or Register to view this content.
line but I'm not sure what.![]()
Please Login or Register to view this content.
Can I nestle an IF function in there? Or should I end the with... one line early, run the IF, and then finish off the IF function?
Many thanks for your help,
AR
Bookmarks