I am trying to do statistical analysis of more than 500 files. I am trying to automate this with a macro, but I am having a hard time with it.
Each file that I work with changes as far as length goes, so I am trying to write a macro that will use the define names to allow for changes in length.
Note that the only sheet that I am working with is on one sheet only per file.
Presently, I am trying to make a macro to define names, like this:
columnA
refers to: =OFFSET(A.HIS!$M$2,0,0,COUNTA(A.HIS!$M:$M),1)
and when I get down to further along the macro I what to do an analysis of the column:
Application.Run "ATPVBAEN.XLA!Descr", ActiveSheet.Range("columnA"), _
ActiveSheet.Range("$Ap$2:$Ap$12"), "C", False, True
The macro works fine like this, but when I try to be more general like this,
This generality is the whole reason to keep from writing a macro for each specific file.
columnA
refers to: =OFFSET(ActiveSheet!$M$2,0,0,COUNTA(ActiveSheet!$M:$M),1)
I get an error
What can I do to fix this?
Each file that I work with changes as far as length goes, so I am trying to write a macro that will use the define names to allow for changes in length.
Note that the only sheet that I am working with is on one sheet only per file.
Presently, I am trying to make a macro to define names, like this:
columnA
refers to: =OFFSET(A.HIS!$M$2,0,0,COUNTA(A.HIS!$M:$M),1)
and when I get down to further along the macro I what to do an analysis of the column:
Application.Run "ATPVBAEN.XLA!Descr", ActiveSheet.Range("columnA"), _
ActiveSheet.Range("$Ap$2:$Ap$12"), "C", False, True
The macro works fine like this, but when I try to be more general like this,
This generality is the whole reason to keep from writing a macro for each specific file.
columnA
refers to: =OFFSET(ActiveSheet!$M$2,0,0,COUNTA(ActiveSheet!$M:$M),1)
I get an error
What can I do to fix this?