How can i get an If formula in excel to edit another cell?

J

Jimmy Hoffa

Im working on a large mostly formula referneced spreadsheet in excel, so that
computer illiterate people here dont have to worry about doing their work on
certin things. I have run into one issue that i cant seem to bypass however
in the logical formulas, or lack there of, in excel. I need to use the if
formula like and if statement that would occur in C++ or Java, however there
is no way to write Then into this. I need the formula to determine whether
the information in a cell is true/false and then edit a range of cells
accordingly based on the logical outcome. I have no problem with the first
portion of this, but i cant make it edit the other cells, which is user input
data. When the function is true, i need it to set the value of the ranged
cells back to 0, deleting the user input, if false it does nothing.

If anyone has any idea on how to get this to work, i dont care about the
complexity. I just really hate excel, and am being forced to use it for its
"user ease", AKA nice interface for the eldery.

Thank You
 
B

Biff

Hi!

You can't do this with formulas, you need some VBA code. If nobody chimes in
with an idea try posting in the Programming forum.

Biff
 
G

Gary's Student

You are correct. The IF() worksheet function does not have the kind of THEN
that you need. The IF() worksheet function also affects only a single cell
rather than a range of cells.

Consider using the IF statement within VBA. The syntax
IF...THEN...ELSE...ENDIF is more like what you are used to. Also VBA can
modify ranges of cells.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top