Hi All,

Any help with the following problem would be appreciated. I'm fairly new to macros so have mainly been using the macro recorder. My data comes in sets of varying numbers of rows, so I need a macro that is adaptable to this (so far I have been able to do this).

I need to use the TREND function e.g the formula I want to use looks like this =TREND($I$15:$I$16,$H$15:$H$16,E4) which I would then drag down until the end of teh corresponding data range. My problem is stemming from the use of the $ sign which I loved until I started recording macros!

So when I record the macro it works fine for the data set I recorded it for, but if I try to use it on the next set of data the absolute reference literally remains absolute and it will use the range of numbers in the original macro. I have tried toggling the 'use relative references' button on and off but it still uses the original numbers the $ sign obviously fixes it regardless. With another equation eg =D3-$D$2 I could just copy the value of D2 down a new column to get around having to use the $ sign, but the TREND function requires the use of a range so I can't do this. I need the values to be fixed for the first set of data, change and then fixed for the next set of data if this is possible.

Any help is gratefully received and I hope the problem is explained clearly enough,

Kara