Checkbox Question


Posted by George L Smyth on May 10, 2001 11:52 AM

I am trying to figure out how I can use a checkbox with what I am trying to do.

At this point, I have a formula which looks at the value in a cell, then performs an action based on the value of that cell.

For instance, the formaula "=IF(RC[-4]=1,RC[-3]*RC[-1],0)" looks 4 cells to the left, and if the value is "1" it multiplied a couple of cells, otherwise it returns a "0".

I am trying to replace the cell with a checkbox and wondering if doing so necessitates the creation of a macro, or if this can still be done with a formula.

For instance, an incorrect formula might be "=IF(CheckBox2_Click=1,RC[-3]*RC[-1],0)" where the multiplication takes place if the box is checked, returns a "0" if not.

Of course, this does not work. Any ideas on this? Can it be done, or do I need to figure out how to write a macro to accomplish this.

Thanks -

George L Smyth

Posted by Dave Hawley on May 10, 2001 12:05 PM


Hi george

A Checkbo has a LinkedCell Property. Set this to cell A1 then you use it in your formula. It will return TRUE for checked


Dave

OzGrid Business Applications

Posted by George L Smyth on May 10, 2001 12:18 PM

Fantastic! The formula then becomes =IF(RC[-3]=TRUE,RC[-2]*RC[-1],0), which works fine.

One more (hopefully) quick question. When I use the checkbox, the value TRUE or FALSE is displayed behind the box. Is this an artifact of the association? If it cannot be removed, I can simply move the box and hide the column.

Cheers, and thanks for the help!

george

Posted by Dave Hawley on May 10, 2001 12:44 PM

George, how about changing the cells Font color to white ?
Dave
OzGrid Business Applications



Posted by George L Smyth on May 10, 2001 1:15 PM

Well, that's I'm here and you're there. Great suggestion! <g><p>Cheers -

george