VBA to do a range of different tasks from a drop down list

danbates

Active Member
Joined
Oct 8, 2017
Messages
377
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I was wondering if someone could help me please?

I would like someone to help me alter this code:

Code:
    If Target.Column <> 5 Then Exit Sub  
    If Target.Value = "Azera" Or Target.Value = "N" Or Target.Value = "L" Or Target.Value = "M" _
    Or Target.Value = "K" Or Target.Value = "H" Or Target.Value = "J" Or Target.Value = "n" _
    Or Target.Value = "l" Or Target.Value = "m" Or Target.Value = "k" Or Target.Value = "h" Or Target.Value = "j" Then
    
      MES_ASA.Show
   
    Else
  
        Range("K" & Target.Row).Value = "N/A"
   
  If Target.Value = "" Then
  Target.Offset(0, 6) = ""
  
    End If
    End If

When I select a letter from the drop down list in column E (Azera, D, E, F, G, H, J, K, L, M, N, P) I want the code to check column F value before triggering the userform.

If column F value is 0 then I want a message box to say "Invalid answer, please choose again" and when the message box is OK'd I would like column E&F to clearcontents.

If column F value is greater than 0 then let the userform trigger as normal.

Any help would be much appreciated.

Kind Regards

Dan
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top