The Student Room Group

Excel Problem Solving function!?

Hello I'm having trouble doing a formulae to solve a problem that i have basically its this:

I have a drop down list in a cell in excel which has (coke, fanta, sprite) what I would like to do is when i pick one from the list and gets displayed in the cell i would like for the cell beside it to show the price of that item, how can I do this I've tried IF functions but doesnt work for me.

Thanks for your time
From John Wood
Reply 1
There is no reason why it should not work, there are a couple of pitfalls which you may have encountered:

1) Do not create your dropdown box using the control toolbox, instead, select a cell and go to tools-validation and under settings set it to validate by list. Then enter your values.

2) You will need to use nested IF statements in order to have your cell pick up the right values. Look at the example here... I populated a combo box with the values "coke" "7up" and "fanta" heres how the computer would check it

Remeber, IF statements are in the form IF(condition, valueiftrue, valueiffalse)

=IF(B2="fanta",3.99,IF(B2="7up",4.11,2.99))

Note, if B2 is Fanta, then its 3.99, if not the system has to go through the IF process again, checking if its 7up, then it can return a value, as there are only 3 values for the combo box, common sence allows the machine to put the final value, coke, at 2.99 as it is neither fanta or 7up, if you needed more, then instead of the 2.99 you would have another IF statement there.

Hope that helps :smile:

Latest

Trending

Trending