# Another Excel question

**URL:** <https://boards.straightdope.com/t/another-excel-question/748358>\
**Category:** Factual Questions\
**Created:** [March 9, 2016, 12:46am UTC](https://boards.straightdope.com/t/another-excel-question/748358 "2016-03-09T00:46:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daylate](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@Daylate](https://boards.straightdope.com/u/Daylate)\
**Post date:** [March 9, 2016, 12:46am UTC](https://boards.straightdope.com/t/another-excel-question/748358/1 "2016-03-09T00:46:39Z")

</div>

I’ve got a neat idea to save quite a bit of work in a spreadsheet if I could only figure out how to do it. I don’t even know how to look it up in “Help”.

The problem: I have a command in a cell that brings in the value of another cell, in another spreadsheet. the command that does this is:

=’\NAME OF SPREADSHEET]AM900

I need to generate the cell designation dynamically by combining the AM (the column number) with the 900 (the row number).

This can be done as a text function easily, but I need to get the result incorporated into the command line as shown above so that the appropriate value will be pulled in from the second spreadsheet.

Any ideas?

---

<div class="post-metadata">

**Author:** ![TroutMan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/troutman/32/6721_2.png) [@TroutMan](https://boards.straightdope.com/u/TroutMan)\
**Post date:** [March 9, 2016, 1:19am UTC](https://boards.straightdope.com/t/another-excel-question/748358/2 "2016-03-09T01:19:38Z")

</div>

There might be an easier way to do it, but this will get you the right result using formulas.

=INDIRECT(ADDRESS(A1,B1,"[my workbook.xlsx]Sheet1"))

ETA: where A1 contains the row number and B1 contains the column number.

---

<div class="post-metadata">

**Author:** ![penultima\_thule](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/penultima_thule/32/3833_2.png) [@penultima\_thule](https://boards.straightdope.com/u/penultima_thule)\
**Post date:** [March 9, 2016, 4:39am UTC](https://boards.straightdope.com/t/another-excel-question/748358/3 "2016-03-09T04:39:15Z")

</div>

+1  
That’s the way to do it.

---

<div class="post-metadata">

**Author:** ![glowacks](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/glowacks/32/5548_2.png) [@glowacks](https://boards.straightdope.com/u/glowacks)\
**Post date:** [March 9, 2016, 4:59am UTC](https://boards.straightdope.com/t/another-excel-question/748358/4 "2016-03-09T04:59:17Z")

</div>

Yep, INDIRECT is an amazing little function. It’s pretty rare that you can get a computer to honestly take a character string constructed from other strings and have it interpreted as meaning something other than that literal character string. When I first read about it I thought it was absolutely useless until I needed to do the exact same thing you did: calculate the address of a cell dynamically.

You can also use the ADDRESS function to do something similar. It takes the row number and column number and returns a reference to a cell with at that row and column. This allows you to calculate numerically rows and columns without having to go to R1C1 notation.

---

<div class="post-metadata">

**Author:** ![Daylate](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@Daylate](https://boards.straightdope.com/u/Daylate)\
**Post date:** [March 9, 2016, 6:20am UTC](https://boards.straightdope.com/t/another-excel-question/748358/5 "2016-03-09T06:20:33Z")

</div>

Thanks, guys - I’ll try those tomorrow. Sounds like just what I needed.

This Board never ceases to amaze me.
