I did some more experiments with code and this is really looking like a problem of the test argument in the IF function.
It is recognizing my "R1C1" entries as text because it is not necessarily looking for a cell reference argument, whereas the true and false results where I'm using the SELECTION() function work fine with the "R1C1" referencew approach.
For example the code I posted above in A1 format that works:
works identically if written as below and cell C146 is selected before calling the macro:
The code I want, at least metaphorically is:
The only way I can get something written like that to return a true value is if that test function is treated as a text comparison, not a cell comparison - which doesn't accomplish what I need, e.g. the following returns true as a tautology:
I'm going to crosspost a question on this language at Excel Banter, will return as soon as I have a link. This is the last glitch in putting to work a number of solutions you have helped me craft.
I will continue to experiment with other calls for the TEST function but if you have any other ideas of approaches to the problem that I might be able to adapt in this archaic language I'm all ears . . . eer eyes.
I'm trying to run down a column looking for the first value that does not match. I had placed the above codes in a FOR/NEXT LOOP and was actually selecting "R[1]C" for the true or match value and had placed a RETURN() to stop the macro in the false value, but because the stumbling block has been getting a working IF test that responds to my location on the currently active sheet I have left out that other language in my examples above. My completed code looked like this:
The loop limit is set to 1214 because that is, to my knowledge, the longest string of matches in the column. In case I'm wrong, I placed a RETURN() past the FOR/NEXT loop if it should run 1214 iterations and still find a matching value.
Brian
Bookmarks