Referencing Multiple Cells with Nested IF statements?

D

dankim

I have three checkboxes in three different cells and they each
correlate to a different number. The checkboxes are set up as
follows: If A1 is clicked then any checkmarks in A2 or A3 disappear.
If A2 is clicked then any checkmarks in A1 or A3 disappear etc.

Since I am not so good at Excel(This is my first week actually working
with the program) I linked the checkboxes to Z1, Z2, and Z3. If A1 is
clicked then Z1 becomes true and Z2 and Z3 are false.

A1 should equal 100.
A2 should equal 200.
A3 should equal 300.

If A1 is clicked then the value in B1 should be 100.
If A2 is clicked then the value in B1 should be 200.
If A3 is clicked then the value in B1 should be 300.

I tried to set up B1's formula along these lines
=IF(Z1, 100), IF(Z2, 200), IF(Z3, 300).

But it didn't work and I can't figure out the proper syntax or if this
is even possible to do this way.

Thanks in advance for your time and sorry if this is a really stupid
question.
 
P

Peter Beach

Hi,

The syntax of the IF statement is:

IF(condition, True part, False part)

So you need something like:

=IF(Z1,100,IF(Z2,200,IF(Z3,300,#NA())))

So you end up nesting successive clauses within each of the False clauses.

HTH

Peter Beach
 

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