Call Macro after cell changes from a dropdown list

Carin

Board Regular
Joined
Feb 4, 2006
Messages
224
I have a dropdown in C5 that has 12 choices. After someone selects a new item from the list (C5 changed), I would like a macro to run. I right clicked on the sheet ("Report") and input the following code:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$c$5" Then
Call nacleanup
End If
End Sub

My nacleanup code is is Module 1 and is as follows:

Code:
Sub nacleanup()
'
' nacleanup Macro

Application.ScreenUpdating = False

Sheets("Creation").Visible = True
Sheets("Creation").Select

Rows("17:218").Select
    Range("d17").Activate
    Selection.EntireRow.Hidden = False
    Range("d17").Select
  
Range("Z17:A218").SpecialCells(xlFormulas, xlErrors).EntireRow.Hidden = True
Sheets("Creation").Visible = False
Sheets("Report").Select
Application.ScreenUpdating = True

'
End Sub

Absolutely nothing happens...please help.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Amend
Code:
If Target.Address = "$[COLOR=#ff0000]C[/COLOR]$5" Then
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,254
Members
448,556
Latest member
peterhess2002

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