Hi,
My goal is to create a macro where it updates my data analysis, such as descriptive analysis, histogram, correlation etc. I've managed to record a macro to do this.
The problem is that i will update my data, add more rows to it, thus the ranges withing the data analysis (histogram..) will change automatically with my extra input. The best solution would be to put dynamic named ranges in the data analysis ranges. This does unfortunately not work for me yet.
It works to put a dynamic name range when creating the macro, but when I want to use the macro it says: "Input range missing. Please Enter." Thus my dynamic range disappears from the macro.
How should I go about this? Am I missing something?
How can I use dynamic name ranges in a macro?
I managed to get abit furher, but the dynamic name range was replaced with $M$17:$M$29
My name range name is "Test"
Could I replace the range in the code with: =Sheet1!Test
Would love any help!
- I want my macro to update my data analysis with just a click, without having to update the ranges within the analysis tools, thus using dynamic name ranges.
VBA code:
Sub Macro10()
'
' Macro10 Macro
'
'
Application.Run "ATPVBAEN.XLAM!Descr", ActiveSheet.Range("$M$17:$M$29"), _
ActiveSheet.Range("$P$19"), "C", False, True
Range("D45").Select
End Sub
Sub Macro11()
'
' Macro11 Macro
'
'
Application.Run "ATPVBAEN.XLAM!Descr", ActiveSheet.Range("$M$17:$M$29"), _
ActiveSheet.Range("$P$19"), "C", False, True
Range("E37").Select
End Sub
My goal is to create a macro where it updates my data analysis, such as descriptive analysis, histogram, correlation etc. I've managed to record a macro to do this.
The problem is that i will update my data, add more rows to it, thus the ranges withing the data analysis (histogram..) will change automatically with my extra input. The best solution would be to put dynamic named ranges in the data analysis ranges. This does unfortunately not work for me yet.
It works to put a dynamic name range when creating the macro, but when I want to use the macro it says: "Input range missing. Please Enter." Thus my dynamic range disappears from the macro.
How should I go about this? Am I missing something?
How can I use dynamic name ranges in a macro?
I managed to get abit furher, but the dynamic name range was replaced with $M$17:$M$29
My name range name is "Test"
Could I replace the range in the code with: =Sheet1!Test
Would love any help!
- I want my macro to update my data analysis with just a click, without having to update the ranges within the analysis tools, thus using dynamic name ranges.
VBA code:
Sub Macro10()
'
' Macro10 Macro
'
'
Application.Run "ATPVBAEN.XLAM!Descr", ActiveSheet.Range("$M$17:$M$29"), _
ActiveSheet.Range("$P$19"), "C", False, True
Range("D45").Select
End Sub
Sub Macro11()
'
' Macro11 Macro
'
'
Application.Run "ATPVBAEN.XLAM!Descr", ActiveSheet.Range("$M$17:$M$29"), _
ActiveSheet.Range("$P$19"), "C", False, True
Range("E37").Select
End Sub