I'm sure there is. It's not the kind of programming I do, so I'm not real good at it. something like
where condition is a boolean that decides when you need this action, and i,j are index numbers to indicate which cell needs to be cleared. I'm assuming that you will have already wrapped the function inside the TEXT() function so it will spill out into the adjacent cell once it is cleared. If you want, you can put this inside of a change or calculate event procedure if you want the code to run automatically with the appropriate event. You may also need an Elseif to restore the formula in the cleared cell when you need that formula
where formulastring is a string variable/constant that stores the necessary formula
Bookmarks