ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel VBA- Trend Function in Macro Problem (https://www.excelbanter.com/excel-programming/293709-excel-vba-trend-function-macro-problem.html)

ksutton79

Excel VBA- Trend Function in Macro Problem
 
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

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 08:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com