How do I stop the Repeat Until command when reaching an empty cell in Excel?
The trick is that when copying an empty cell to the clipboard, the clipboard is not really empty because Excel adds hidden formatting characters.
A couple of extra steps are required for Macro Express to determine that a cell is empty. After copying the cell to the clipboard, save the contents to a text string variable. Modify the string by using the Trim command to trim the extraneous hidden characters that Excel adds. Then a true comparison can be made.
Repeat Until %T1% = “”
Variable Set String %T1% from Clipboard
Variable Modify String: Trim %T1%
*** remainder of macro steps ***
– Applies to: Macro Express and Macro Express Pro