# 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.  Reply With Quote

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

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

4. Barryj

Have you assigned x2 to the cell in properties?  Reply With Quote

5. Yes X2 is the cell linked to the check box.  Reply With Quote

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

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.  Reply With Quote

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]  Reply With Quote

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?  Reply With Quote

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]  Reply With Quote

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

#### Posting Permissions

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