• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

question about excel formulas

Semidevil

Diamond Member
so I have some cells that will input data based on the value of another cell.

i.e, I wrote an If statement in my formula bar that says if A2 is yes, then B2 will say "N/A." ETC ETC.

I also have a 'clear all' macro that is suppose to clear all my data.

Is there a way to keep the formula permanantly there, even after the clear all button is pushed? I dont mind erasing the data, but I want to keep the formula always in the cell.

any ideas how to approach this?

p.s. I tried the protect contents. but when I do that, it wont run the clear all macro. gives me an error.


the only thing I can think of is to record a macro of me deleting manually....but is there a more effecient way?
 
I'm not sure that I'm following this, but it seems like you want to delete the data and then have it appear that the formula is gone as well (but its still there)? If so, you could just do something like =If(A2="Yes", NA(), ""). That would put an empty text string in the formula result and the cell would appear to be empty. I'm not sure what the macro has to do with it, but obviously it shouldn't be deleting the formula.
 
Back
Top