Jerry, hope you re well, thanks again...
so I played around with the macro and the LOOKUP function to get an idea how it works and I nearly found out everything. I hope you dont mind if I have one question and I also found another issue. This problem is like Medusa... once u knocked of a head 3 to 4 new heads are popin up...
I changed two things in the macro:
I ve always added "+1"
and I ve also used debug.print to get a sense of what the macro is doin:
My question now is, as far as I understood, the do loop searches in J for the first X which is now "$J$35" and as long the last X is or the last X found by the loop is not equal to "$J$35", the macro keeps running. I am bit confused now, because after the last X, which was "End of loop X.Address=$J$146" the loop states as next X "$J$35"
It this just the nature of the Do loop? That after it doesnt find another X in J, it automatically jumps back to the first value?
I ve also expanded the sheet a bit while I was playing with the macro. In my example the first value was X and the last value was Y in Range "J", but when the last value in "J" now is X, the macro just keeps running.
In fact sometimes my cells will start with X and end with Y, but sometimes they start with X and end with X for column "J".... and the same is true for the other way around ...so starting with Y and ending with X and starting with Y and ending with Y.
I dont really have an idea how to fix that, I attached the file as "example 2.2 forum_issue.xlsm". maybe you have an idea? the first idea was to let the loop run until the last cell, but I am not so sure if that makes sense.
Thank u so much again.
Bookmarks