Al. So
Al. So

Reputation: 53

Copy the cell value into a formula

I am trying to calculate the average in excel with two columns with the cell address data.

Here is an example:

Start    End      Average
$CL$2    $CP$2    =average($CL$2:$CP$2)
$AD$3    $AT$3    =average($AD$3:$AT$3)
$AD$4    $AT$4    =average($AD$4:$AT$4)
$AD$5    $AT$5    =average($AD$5:$AT$5)

When I click on the Cell it references the cell with the value in it and the average formula doesn't work

Thank you

Upvotes: 0

Views: 80

Answers (1)

BigBen
BigBen

Reputation: 49998

Use the INDIRECT function to return a reference specified by a text string - in this case, your starting and ending cell addresses, concatenated with the colon :.

For example:

=AVERAGE(INDIRECT(A2&":"&B2))

enter image description here

Upvotes: 1

Related Questions