I’m creating a spreadsheet to train my numerical skills.
Now, I use VBA macros to generate a new problem once the current one has been correctly solved. To do so, I still have to press a button in the worksheet, which costs time and is annoying.
Is there a way that I can execute a macro when a certain condition is met?
for instance:
if A1 = "correct!"
then <run macro>
else <do nothing>
Also, let me know if you’re interested in the spreadsheet, I’d be happy to share it with you guys.
best,
Pieter
Add this as code for your Worksheet:
Worksheet_Changeis called whenever something is changed. As it looks likeA1is calculated, you can not check forTargetin that case but check for the value of the cell.