# Populate cell based on choices from a drop down menu"

#### Marq

##### Well-known Member
using 365

I have a drop down menu in cell B6. I want to populate cell E29 with an X based on a choice I make in B6 drop down.

Multiple choices from the B6 drop down list can give me an X in E29 and I have a formula working in E29 that gives me an X based on one of the choices.....how do I make E29 populate with an X if I chose a different choice in B6 drop down?

Here is my formula in E29 working with one choice: =IF(\$B\$6="Cart 1 (hot)","X","") So this is saying leave E29 blank UNLESS I choose Cart 1 (hot) from B6 drop down...and if I do chose it, put an X in E29.

But I also need an X to show in E29 if I choose Cart 2 (hot) in B6 drop down.

How do I incorporate that cart 2 hot into the formula? I tried this but E29 populates as FALSE : =IF(\$B\$6="Cart 1 (hot)",IF(\$B\$6="Cart 2 (hot)","X",""))

Why is the formula not working???

### Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use \$ signs: \$V\$2:\$Z\$99 will always point to V2:Z99, even after copying

##### Well-known Member
Hi Marq,

IF statements have 3 parts: Test, result if TRUE, result if FALSE
Your statement checks for Cart 1 and if true then checks for Cart 2, which makes no sense. Also it doesn't have a FALSE option for Cart 1 so that will show the logical result, FALSE.

If you have several options to populate in E29 then I suggest a lookup based on which B6 option is selected, like this:

Marq2.xlsx
BCDEFGHIJK
1CartPopulate
2Cart 1X
3Cart 2X
4Cart 3N
5Cart 4T
6Cart 3Cart 5X
7
28
29N
Sheet1
Cell Formulas
RangeFormula
E29E29=VLOOKUP(\$B\$6,\$J\$2:\$K\$6,2,0)
Cells with Data Validation
CellAllowCriteria
B6List=\$J\$2:\$J\$6

#### aghaffar82

##### Board Regular
And if you want to remain stuck with IF function, try this:

=IF(\$B\$6="Cart 1 (hot)","X",IF(\$B\$6="Cart 2 (hot)","X",""))

Copy this part before the last comma and replace your criteria for the remaining conditions one by one.

,IF(\$B\$6="Cart 2 (hot)","X"

#### Marq

##### Well-known Member
And if you want to remain stuck with IF function, try this:

=IF(\$B\$6="Cart 1 (hot)","X",IF(\$B\$6="Cart 2 (hot)","X",""))

Copy this part before the last comma and replace your criteria for the remaining conditions one by one.

,IF(\$B\$6="Cart 2 (hot)","X"
That works..thanks!

Thanks to everyone that chimed in!

#### aghaffar82

##### Board Regular
Thanks for the feedback. Glad to assist you

Replies
6
Views
196
Replies
1
Views
94
Replies
4
Views
681
Replies
1
Views
107
Replies
4
Views
111

1,172,221
Messages
5,879,770
Members
433,455
Latest member
d3kk3r

### 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