
Originally Posted by
Excel_vba
I forgot to mention I want to loop from the bottom. Here is what I have:
You are trying to use two different methods at the same time. I will separate the two and show how to use each one. But first let's clarify the problem you are a trying to solve.
Your first post said "locate the first blank cell above E29" but your code shows a loop that finds every blank cell in column E from row 9 to 29. Because you are checking every cell in that range, why does it matter whether you go from bottom to top, or top to bottom? Normally direction matters if you are inserting or deleting rows but you don't seem to be doing that.
Here are two methods, assuming you want to check every cell in E9:E29, from the bottom up, and fill in blank cells with a string.
One method is to loop through every row. If you do that there is no reason to use Find.
The other method is to let Find check the cells for you, although a different type of loop is necessary. This is a little more complicated and probably overkill for your situation.
Edit: I modified this code to remove the variable FirstFound because it's not necessary if you are changing every cell after you find it. Normally you need FirstFound because Find search wraps around, but if you change every found cell then eventually Find won't find anything.
Bookmarks