user defined variable arguments in an average function

T

Travis

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?
 
B

Bob Phillips

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

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 

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

Top