Hi,
In column S of my worksheet, there is the formula "=(A2&B2)=(N2&K2)" which results in either a TRUE of FALSE value in each cell under the column, depending on the values in AB and NK. There are several rows with this formula auto-filled in column S.
Now, I have a piece of code that I want to run in a loop as long as there is "FALSE" in any of the cells in column S. Among other things, the code converts these FALSEs into TRUEs. As soon as all cells have "TRUE", the code should stop its loop. This is what I'm using:
This partially works because the code does keep looping. However, the loop can't tell when there are no more FALSEs and stops due to an error instead of stopping naturally. I have attached a screenshot of the error. Any help/input is appreciated!
In column S of my worksheet, there is the formula "=(A2&B2)=(N2&K2)" which results in either a TRUE of FALSE value in each cell under the column, depending on the values in AB and NK. There are several rows with this formula auto-filled in column S.
Now, I have a piece of code that I want to run in a loop as long as there is "FALSE" in any of the cells in column S. Among other things, the code converts these FALSEs into TRUEs. As soon as all cells have "TRUE", the code should stop its loop. This is what I'm using:
VBA Code:
'fr is last row of data
Do Until Range("S" & fr + 1) = "FALSE"
'all the code is here
Loop
This partially works because the code does keep looping. However, the loop can't tell when there are no more FALSEs and stops due to an error instead of stopping naturally. I have attached a screenshot of the error. Any help/input is appreciated!