Forum Discussion

Uguey's avatar
Uguey
Copper Contributor
Mar 17, 2020
Solved

Excel mandatory cell with dropdown menu

Hello everyone   I have basic information in let's say columns M, N and O. In column P I have a dropdown menu consisting of 3 different names. What I would like now ist 1) that if any data in co...
  • Savia's avatar
    Mar 17, 2020

    You can do this with a very small macro on the page itself:

     

    Private Sub worksheet_Change(ByVal target As Range)

    If Not Intersect(target, Range("M:O")) Is Nothing Then
    MsgBox ("You must now change the dropdown in column P")
    Else
    End If

    End Sub

     

    I have attached an example - press Alt F11 to open the VBA editor and see the code in situ.

Resources