Hi all,
I tried a couple things to no avail and every solution I could find online was for the same tab (Worksheet_change).
Currently, I have an excel file with a tab called Pivot that has a drop-down menu in cell E7 and a tab called Data that has this macro in it:
Sub Macro_Mar()
Range("AA3:AL150000").Select
Selection.ClearContents
Range("AA2:AL2").Select
Selection.Copy
Range("AA3:AL150000").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
It's a simple macro that deletes old data and copy/paste value the new one as the file is too slow if I keep all the formulas. Only the first row (row 2) has the formulas in it full time which changes with the drop-down menu change.
Right now, every time I change the drop-down menu, I go click on a button in the Data tab to start the macro like a peasant, but I was wondering how can the code above run every time the drop-down value changes automatically?
Thanks.
I tried a couple things to no avail and every solution I could find online was for the same tab (Worksheet_change).
Currently, I have an excel file with a tab called Pivot that has a drop-down menu in cell E7 and a tab called Data that has this macro in it:
Sub Macro_Mar()
Range("AA3:AL150000").Select
Selection.ClearContents
Range("AA2:AL2").Select
Selection.Copy
Range("AA3:AL150000").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
It's a simple macro that deletes old data and copy/paste value the new one as the file is too slow if I keep all the formulas. Only the first row (row 2) has the formulas in it full time which changes with the drop-down menu change.
Right now, every time I change the drop-down menu, I go click on a button in the Data tab to start the macro like a peasant, but I was wondering how can the code above run every time the drop-down value changes automatically?
Thanks.