add a number into a cell when a dropdown menu item is selected

I have two items in a dropdown menu in Numbers. When one is selected I need a number to be inserted into a cell in another row, when the other is selected,d I need a different number to be inserted to that cell


I was wondering if it's something like this:

(if B2=choice2; then C2=20);(if B2=choice3; then C2=40)

but obviously that's not working....

Posted on Jan 16, 2024 5:32 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 16, 2024 8:22 AM

You can try something like this:





The formula in C2:


=SWITCH(B2,"Choice 1",20,"Choice 2",40)


More on SWITCH here.


SWITCH - Apple Support


If your region uses , as the decimal separator then use ; instead of , in the formula, e.g.,


=SWITCH(B2;"Choice 1";20;"Choice 2";40)


SG


3 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

add a number into a cell when a dropdown menu item is selected

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.