# Thread: Solved: Check Box Formula

1. ## Solved: Check Box Formula

I am trying to get this formula to read if check box is true and show nothing if it shows false.

This is the formula

=IF(X2=TRUE,=INDEX,Diagrams!\$C:\$C,MATCH(C2,Diagrams!\$A:\$A,0)+ROW(\$A\$1)-1),"")

Is this able to work as such or should I be looking at another approach.

This part of the formula =INDEX,Diagrams!\$C:\$C,MATCH(C2,Diagrams!\$A:\$A,0)+ROW(\$A\$1)-1)

This part is looking up another sheet and works fine, just trying to add the check box part if possible.

Thanks for any assistance.

2. does your formula contain equal sign "=" before "INDEX"?

3. Yes, I have tried it with and without the = sign but have had no luck.

4. Barryj

Have you assigned x2 to the cell in properties?

5. Yes X2 is the cell linked to the check box.

6. In thinking about this issue, the checkbox is an object placed on the worksheet, yet it seems you are checking the cell location.

7. imho, a formula with two = signs must give an error.

you removed and did not work...
can you post the workbook with representative data.

8. am i missing something?

should it be
[VBA]=INDEX(Diagrams!\$C:\$C,MATCH(C2,Diagrams!\$A:\$A,0)+ROW(\$A\$1)-1)[/VBA]

rather than
[VBA]=INDEX,Diagrams!\$C:\$C,MATCH(C2,Diagrams!\$A:\$A,0)+ROW(\$A\$1)-1)[/VBA]

9. Ok I have got it mostly working with
[VBA]=IF(X2=TRUE,INDEX(Diagrams!\$F:\$F,MATCH(B2,Diagrams!\$A:\$A,0)+ROW(\$A\$1)-1))[/VBA] it displays the result that I want when cell X2 displays TRUE.

But when the check box is not checked it displays false in the cell where I have the formula and the desired result.

As a work around I have custom formatted the cell to white text if it displays false.

Can I add to the formula to show the cell blank when X2 shows FALSE?

10. referring to the formula in post#1
[VBA]=If(X2=True,INDEX(Diagrams!\$F:\$F,MATCH(B2,Diagrams!\$A:\$A,0)+ROW(\$A\$1)-1),"")[/VBA]

11. Thankyou mancubus, it is now working fine, I will mark this thread as solved.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•