A simplified version of my problem is that on a different sheet called Sheet2 I have data that I want to average:


Depending on where the code above is used I need to exchange column A for another letter, for example column D. To do this I have created a function:


which will output D.

My problem is that instead of having to write:


I want to use:


but Excel does not accept this. How can I use functions next to Sheet2!?

  • This could be done with INDIRECT, but there may be a better way. What determines which column you want to use? – cybernetic.nomad Oct 16 at 16:16
  • As I move to the right in my spreadsheet I want to increase by increments of 3, i.e. the first Average uses column A, second Average uses column D(=A+3), third Average uses column G (=A+3+3) etc – litmus Oct 16 at 16:25

You can use INDIRECT :


  • Thank you, Máté! This is exactly what I needed help with, I would never have figured out that its possible to use quotation marks in this manner. Thanks!! – litmus Oct 16 at 18:42
  • There is a useful Excel function that simplifies and strengthens this approach, called ADDRESS(row, column,[abs],[format],[sheet]) that produces the cell reference as text. For example, the output of ADDRESS(30,77,,,"Sheet2") is "Sheet2!$BY$30" The benfits of using this include: (1) formula that is short, simple, fast and understandable (2) handling columns > "Z", and (3) coping with localisation issues. So you can use INDIRECT( ADDRESS(.....) & ":" & ADDRESS(....) ) – Duke Bouvier Oct 21 at 20:22

OFFSET and INDIRECT are volatile we can use INDEX


The 0 tells the INDEX to return all the rows and the 4 is the 4th column. So all the rows from 1 to 100 in column 4 will be averaged.

As per your comments:


Here is one way:


Note that OFFSET is volatile and will increase the calculation load in your workbook

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.