🔒 Closed Google Sheets: changing cell values depending on selected dropdown option

Status
Not open for further replies.

Aviatrix

Honorary Poster
Hello! Pahelp lang po paano po mapapawork to sa gsheets.

Let's say sa A1 may dropdown po ako, ang options ay X or Y. If sinelect ko yung X from dropdown, magkakavalue yung cells below that. If sinelect ko naman is Y from dropdown, yung value magiiba. If wala naman ako sinelect sa dropdown, wala din value yung cells.

Thanks po 🥰

IMG_20230522_100402_027~2.webp IMG_20230522_095745_038~2.webp IMG_20230522_095812_277~2.webp
 
Hello! Sure, I can help you with that. Here's how you can do it:

1. Select the cells where you want the values to appear when you select an option from the dropdown.
2. Right-click on the selected cells and choose "Data validation" from the dropdown list.
3. In the "Criteria" section, choose "List from a range" from the dropdown list.
4. In the "List of items" section, enter the options X and Y separated by a comma (e.g. X,Y).
5. In the "Range" section, enter the cell reference for the dropdown (e.g. A1).
6. Click "Save" to close the data validation window.

Now, let's say you want the values in cells B1 and B2 to change depending on the selected option in cell A1.

1. In cell B1, enter the value that you want to appear when X is selected from the dropdown (e.g. 10).
2. In cell B2, enter the value that you want to appear when Y is selected from the dropdown (e.g. 20).
3. Select cells B1 and B2, and right-click on them.
4. Choose "Conditional formatting" from the dropdown list.
5. In the conditional formatting window, choose "Based on formula" from the dropdown list.
6. Enter the following formula in the "Value or formula" field:

=IF($A$1="X",B1,IF($A$1="Y",B2,""))

This formula checks the value in cell A1 and displays the corresponding value in cells B1 and B2. If no option is selected in the dropdown, it displays nothing ("").

7. Choose the formatting style that you want to apply to the cells when the formula is true.
8. Click "Done" to close the conditional formatting window.

That's it! Now, when you select an option from the dropdown in cell A1, the corresponding value will appear in cells B1 and B2.
 
Status
Not open for further replies.

About this Thread

  • 1
    Replies
  • 422
    Views
  • 1
    Participants
Last reply from:
Unknown user

Trending Topics

Online now

Members online
730
Guests online
1,362
Total visitors
2,092

Forum statistics

Threads
2,273,537
Posts
28,950,256
Members
1,235,806
Latest member
dev4youu
Back
Top