Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Select value in drop menu to populate adjacent cell

I want to select value from a drop menu in one cell that will populate the value of the adjacent cell

so I select apples from a drop menu and the adjacent cell populates with "3" or some value


Looked at conditional formatting - maybe there's a way to use that but it's not obvious


THX

MacBook Air 13″, macOS 12.6

Posted on Mar 14, 2023 7:01 PM

Reply
Question marked as Best reply

Posted on Mar 15, 2023 7:30 AM

You can consider using the SWITCH function. Compact and easy to edit.




=SWITCH(A2,"apples",3,"pears",4,"bananas",10,"peaches",8)


In this example A2 is the Pop-Up Menu. The value in B2 changes automatically when I make a different choice in A2.


After the A2 in the formula you simply have a series of switch-value if-match pairs.


More on SWITCH here:


SWITCH - Apple Support


Use ; instead of , in the formula if your region uses , as the decimal separator.


SG


2 replies
Question marked as Best reply

Mar 15, 2023 7:30 AM in response to GeggyPo

You can consider using the SWITCH function. Compact and easy to edit.




=SWITCH(A2,"apples",3,"pears",4,"bananas",10,"peaches",8)


In this example A2 is the Pop-Up Menu. The value in B2 changes automatically when I make a different choice in A2.


After the A2 in the formula you simply have a series of switch-value if-match pairs.


More on SWITCH here:


SWITCH - Apple Support


Use ; instead of , in the formula if your region uses , as the decimal separator.


SG


Mar 14, 2023 11:53 PM in response to GeggyPo

"…so I select apples from a drop menu and the adjacent cell populates with "3" or some value."


You will need a set of cell pairs to tell Numbers what value is to be placed in the target cell for each of the items listed on the pop-up menu. These can be placed in the main table, or, as done in the example, on a separate table


Example:


Each cell in column B of the main table (Table 1) contains the same pop-up menu list of nine fruits:

The second table, "Items", contains the same list in column A, and a list of numbers, each associated with one of the named fruits.


Each cell in column C of Table 1 contains a copy of this formula:


When a fruit name is chosen in a cell in column B of Table 1 gets that name for the cell on its row of column B, searches for that name in column A of Items, and, on finding the name, returns the value in the adjacent cell of column B of Items.


Regards,

Barry


Select value in drop menu to populate adjacent cell

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