Excel VBA- Trend Function in Macro Problem

  • Thread starter Thread starter ksutton79
  • Start date Start date
K

ksutton79

Help! I am trying to use the Excel trend function in a macro that I a
writing. I need to place the trend data into an array within my macro
I keep getting two error messages. One saying that there is a typ
mismatch when trying to subtract phase20 from phasetrend. And the othe
saying that the trend data can not be assigned to an array. All of th
types within the macro are variant. By the way, data is being importe
into the macro. Phase20 is a subset of the imported data.

Sample of code:

phasetrend = Application.WorksheetFunction.trend(phase20)
dflp = phase20 - phasetrend

Any help would be greatly appreciated
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top