# Formula Checkbox

#### excelmain

##### New Member
Can you in Excel using the formula bar check a “String” value from a specific cell and then if matching that specific “String” value check a checkbox? Quite the opposite of most uses and that is why I am finding it hard to pull off. I can easily do it with VBA but I was curious about using the formula bar. Most uses are "check" the check box and have a string value show up in a box or something else take place. I am trying to check a string and have the check box become checked??

### Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi and welcome to the board.

The result of your match needs to return TRUE or FALSE - the values the checkbox is expecting.

For example, if the checkbox is linked to cell A3 and the string you want to check against is in cell A2 and the string you're entering is in cell A1.

So cell A2 has the word "Hello" and cell A1 has the word "Help". In A3 enter the formula =A2=A1 which is asking does A2 = A1 - True or False?

Hello Darren,

I really appreciate the response to my question. If I gave you the following VBA:

IF A1 = "Epic" then
Checkbox1.value = True
Else
Checkbox1.value = False

From what you are saying I assume it is not possible to achieve this with formula bar because it needs to "return" a True or False which is the affect of checking the box. I have tried multiple things even with "linking the cell" and checking that value with =IF( etc. ) but it does not work.

My Actual code that works is:

If Range("A1") = "Epic" Then
CheckBoxes("Check Box 1").Value = True
Else
CheckBoxes("Check Box 1").Value = False
End If

But thanks if nothing can be done in a "Formula Bar".

If you use "linking the cell" and link it to cell \$A\$3 then enter this formula in cell \$A\$3:
=\$A\$1="Epic"

If A1 = "Epic" it will show TRUE and the tick box will tick, otherwise it will show FALSE and the tick box will remain blank.

Edit: Manually ticking the tick box will overwrite the formula with TRUE/FALSE so lock it and protect the sheet.

Last edited:
Worked like a champ. You are awesome, Darren. I appreciate this very much.

Your code could also be rewritten as:
Code:
CheckBoxes("Check Box 1") = Range("A1") = "Epic"

This is because Range("A1") = "Epic" will return TRUE or FALSE so can be fed straight into the check box value.

Replies
5
Views
593
Replies
8
Views
1K
Replies
2
Views
225
Replies
2
Views
729
Replies
10
Views
3K

1,203,453
Messages
6,055,533
Members
444,794
Latest member
HSAL

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back