+ Reply to Thread
Results 1 to 4 of 4

user defined variable arguments in an average function

  1. #1
    Travis
    Guest

    user defined variable arguments in an average function

    Suppose 20 successive cells in row 9 (from column 1 through 20) contain
    a array of numbers. Is there a way to create an AVERAGE function where
    the arguments are variable depending upon terms that are entered into
    other cells on the worksheet.

    For the example above, the row would be fixed to 9 and I want to allow
    the user to enter the begin and end columns to complete the arguments.

    I tried the example below, where Begin and End UserDefinedColumn are
    the cell names where the user enters in the beginning and ending
    columns on the array they wish to obtain an average from, however I was
    just given a #VALUE! error.

    AVERAGE(BeginUserDefinedColumn & "9:" & EndUserdefinedColumn & "9")

    Any suggestions?


  2. #2
    Bob Phillips
    Guest

    Re: user defined variable arguments in an average function

    =AVERAGE(INDIRECT(BeginUserdefinedcolumn&"9:"&EndUserdefinedcolumn&"9"))

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Travis" <travisrbird@gmail.com> wrote in message
    news:1142274046.754168.66600@i40g2000cwc.googlegroups.com...
    > Suppose 20 successive cells in row 9 (from column 1 through 20) contain
    > a array of numbers. Is there a way to create an AVERAGE function where
    > the arguments are variable depending upon terms that are entered into
    > other cells on the worksheet.
    >
    > For the example above, the row would be fixed to 9 and I want to allow
    > the user to enter the begin and end columns to complete the arguments.
    >
    > I tried the example below, where Begin and End UserDefinedColumn are
    > the cell names where the user enters in the beginning and ending
    > columns on the array they wish to obtain an average from, however I was
    > just given a #VALUE! error.
    >
    > AVERAGE(BeginUserDefinedColumn & "9:" & EndUserdefinedColumn & "9")
    >
    > Any suggestions?
    >




  3. #3
    Niek Otten
    Guest

    Re: user defined variable arguments in an average function

    =AVERAGE(INDIRECT(A3&"9:"&B3&"9"))

    Start col in A3, End col in B3

    --
    Kind regards,

    Niek Otten

    "Travis" <travisrbird@gmail.com> wrote in message news:1142274046.754168.66600@i40g2000cwc.googlegroups.com...
    > Suppose 20 successive cells in row 9 (from column 1 through 20) contain
    > a array of numbers. Is there a way to create an AVERAGE function where
    > the arguments are variable depending upon terms that are entered into
    > other cells on the worksheet.
    >
    > For the example above, the row would be fixed to 9 and I want to allow
    > the user to enter the begin and end columns to complete the arguments.
    >
    > I tried the example below, where Begin and End UserDefinedColumn are
    > the cell names where the user enters in the beginning and ending
    > columns on the array they wish to obtain an average from, however I was
    > just given a #VALUE! error.
    >
    > AVERAGE(BeginUserDefinedColumn & "9:" & EndUserdefinedColumn & "9")
    >
    > Any suggestions?
    >




  4. #4
    Travis
    Guest

    Re: user defined variable arguments in an average function

    Works great...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