Just can't figure it out. I have a column of 2000 formulas and values.
Right now, A1:A1620 contains values, and A1621:A2000 contains
formulas. The formulas in A1621:A2000, at the moment, return empty
strings, all of them, so it looks like only the 1620 first rows
So the formulas looks something like =IF(this and that;"";something
else) (but a bit more complicated). The point is that if I input
something on a ”new” row in one of the other columns, the A column
shall, in some cases, display something.
Okay, that's what the spreadsheet looks like, roughly.
Now I use a couple of macros to do things for me a lot faster than I
could ever do myself. One small part of a new macro I'm trying to
write needs to search for the first ”empty” row, which means the first
row where the A column contains a formula that returns an empty
Here's what I tried:
Function FindCurrentRow(Sheet As Object) As Integer
Dim SearchDescriptor As Object
.SearchByRow=False ' I want to search by column, starting at A.
.SearchType=1 ' 0=Search in formulae, 1=Search values.
Dim Found As Object
In this example I expect the function to return 1620 (which is the row
address for the cell A1621). Instead 2000 is returned, so for some
reason, when my cell formula returns "", that doesn't seem to be the
same as .SearchString="".
I also tried different values of .SearchValue, still with the same
result: 2000 instead of 1620. So it only finds the first cell in the A
column that is REALLY empty – no formula, no value.
To me this seems like a bug, but for someone else, hopefully, it might
seem like I'm just stupid, so feel free to call me stupid and, more
important, tell me what I'm doing wrong and how I should do instead…