Populate cell based on choices from a drop down menu"

Marq

Well-known Member
Joined
Dec 13, 2004
Messages
913
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
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???
 

Some videos you may like

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Toadstool

Well-known Member
Joined
Mar 5, 2018
Messages
1,404
Office Version
  1. 2016
Platform
  1. Windows
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
Joined
Jun 13, 2019
Messages
65
Office Version
  1. 365
Platform
  1. Windows
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"
 
Solution

Marq

Well-known Member
Joined
Dec 13, 2004
Messages
913
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
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
Joined
Jun 13, 2019
Messages
65
Office Version
  1. 365
Platform
  1. Windows
Thanks for the feedback. Glad to assist you :)
 

Watch MrExcel Video

Forum statistics

Threads
1,128,159
Messages
5,629,038
Members
416,362
Latest member
Cocito

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top