+ Reply to Thread
Results 1 to 5 of 5

Range of averages

  1. #1
    teepee
    Guest

    Range of averages

    Can anyone help

    I have a value for T1 and a value for T11 (which might be greater or
    lesser.)

    I want to fill T2 through T10 with a series of averages to smoothly fill the
    gap so to speak.

    So if T1 were 1 and T11 were 11, the series would count out 1 to 11
    And if T1 were 22 and T2 were 2, then the series would count backwards from
    22 to 2, even number only.

    Anyone know how?



  2. #2
    Tom Ogilvy
    Guest

    Re: Range of averages

    Sub LinearFill()
    Dim StepValue
    Range("T1:T11").Select
    StepValue = (Selection(Selection.Count) - Selection(1)) /
    (Selection.Count - 1)
    Selection.DataSeries Rowcol:=xlColumns, Type:=xlLinear, Date:=xlDay, _
    Step:=StepValue, Trend:=False
    End Sub

    --
    Regards,
    Tom Ogilvy

    "teepee" <[email protected]> wrote in message
    news:[email protected]...
    > Can anyone help
    >
    > I have a value for T1 and a value for T11 (which might be greater or
    > lesser.)
    >
    > I want to fill T2 through T10 with a series of averages to smoothly fill

    the
    > gap so to speak.
    >
    > So if T1 were 1 and T11 were 11, the series would count out 1 to 11
    > And if T1 were 22 and T2 were 2, then the series would count backwards

    from
    > 22 to 2, even number only.
    >
    > Anyone know how?
    >
    >




  3. #3
    Gary''s Student
    Guest

    RE: Range of averages

    In T2 put:
    =T1+($T$11-$T$1)/10
    and copy down to T10.


    --
    Gary's Student


    "teepee" wrote:

    > Can anyone help
    >
    > I have a value for T1 and a value for T11 (which might be greater or
    > lesser.)
    >
    > I want to fill T2 through T10 with a series of averages to smoothly fill the
    > gap so to speak.
    >
    > So if T1 were 1 and T11 were 11, the series would count out 1 to 11
    > And if T1 were 22 and T2 were 2, then the series would count backwards from
    > 22 to 2, even number only.
    >
    > Anyone know how?
    >
    >
    >


  4. #4
    Tom Ogilvy
    Guest

    Re: Range of averages

    Some wordwrap problems:

    Sub LinearFill()
    Dim StepValue
    Range("T1:T11").Select
    StepValue = (Selection(Selection.Count) - _
    Selection(1)) /(Selection.Count - 1)
    Selection.DataSeries Rowcol:=xlColumns, _
    Type:=xlLinear, Date:=xlDay, _
    Step:=StepValue, Trend:=False
    End Sub

    or manually
    select your range and do Edit=>Fill=>Series.

    select Row and linear

    --
    Regards,
    Tom Ogilvy

    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    > Sub LinearFill()
    > Dim StepValue
    > Range("T1:T11").Select
    > StepValue = (Selection(Selection.Count) - Selection(1)) /
    > (Selection.Count - 1)
    > Selection.DataSeries Rowcol:=xlColumns, Type:=xlLinear, Date:=xlDay, _
    > Step:=StepValue, Trend:=False
    > End Sub
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "teepee" <[email protected]> wrote in message
    > news:[email protected]...
    > > Can anyone help
    > >
    > > I have a value for T1 and a value for T11 (which might be greater or
    > > lesser.)
    > >
    > > I want to fill T2 through T10 with a series of averages to smoothly fill

    > the
    > > gap so to speak.
    > >
    > > So if T1 were 1 and T11 were 11, the series would count out 1 to 11
    > > And if T1 were 22 and T2 were 2, then the series would count backwards

    > from
    > > 22 to 2, even number only.
    > >
    > > Anyone know how?
    > >
    > >

    >
    >




  5. #5
    teepee
    Guest

    Re: Range of averages


    "Gary''s Student" <[email protected]> wrote in message
    news:[email protected]...
    > In T2 put:
    > =T1+($T$11-$T$1)/10
    > and copy down to T10.


    of course. brilliant yet obvious.
    Thanks



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1