Forum Discussion
Kristi_Stead
Jul 13, 2023Copper Contributor
Excel - Notes
Hi,
Is there a way to have a note auto-populate when a certain value is selected from a dropdown list?
I.E. I have a specific list - If the drop down selected is 'Did Not Start', is there a way for a note to auto populate on that field?
- NikolinoDEGold Contributor
It is possible to have a note automatically populate when a certain value is selected from a dropdown list in Excel.
Here is how you can achieve this:
- Create a dropdown list:
- Select the cell where you want the dropdown list to appear.
- Go to the Data tab in the Excel ribbon and click on Data Validation.
- In the Data Validation dialog box, select "List" from the "Allow" dropdown.
- In the "Source" field, enter the values for your dropdown list separated by commas (e.g., "Did Not Start, In Progress, Completed").
- Click OK to create the dropdown list.
- Add notes to the cells:
- Right-click on the cell where you want the note to appear (the cell linked to the dropdown list).
- Choose "Insert Comment" from the context menu.
- A small comment box will appear next to the cell. You can enter the note text in this box.
- Add a formula to auto-populate the note:
- Right-click on the sheet tab at the bottom and select "View Code." This will open the Visual Basic for Applications (VBA) editor.
- In the VBA editor, paste the following code:
Vba code:
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$1" Then 'Change A1 to the cell address where your dropdown list is located If Target.Value = "Did Not Start" Then 'Change "Did Not Start" to the value that triggers the note Target.NoteText "Your note text goes here." 'Replace "Your note text goes here." with the desired note text Else Target.ClearComments 'This line clears the note if a different value is selected End If End If End Sub
Now, whenever you select "Did Not Start" from the dropdown list, the note will automatically populate with the specified text. If you select a different value, the note will be cleared.
Make sure to adjust the cell references and values in the code to match your specific worksheet setup. Since no one has answered it for at least one day or more, I entered your question in various AI. The text and the steps are the result of various AI's put together.
My answers are voluntary and without guarantee!
Hope this will help you.