Jun 3, 2013

Variable Excel cell references

I just learned a new Excel function today: the INDIRECT function.

It allows you to put together a cell reference from text strings.

Examples

  =INDIRECT("sheet1!"&variableColumn&"2)  If there is a cell named 'variableColumn' with the text 'A', then this will return the value in "sheet1!A2"

=INDIRECT(A3&"2)  If A3 has the text 'B', then this will return the value in B2




No comments:

Post a Comment