Monday, 8 June 2009

Excel tip - INDIRECT + ADDRESS function

Recently I came across with two very useful Excel function - INDIRECT and ADDRESS, which I think is worth keeping a note here.

For those who uses Excel as their working tool or for any other use, sometimes they might need to have a dynamic formula that access different cell value depending on the user input. For example, a formula that can grab value from a predefined table given the coordinate (column and row), then in this case function that can dynamically generates cell address would be very useful.

Here are some brief outline of the functions (parameters in square brackets are optional):

Address - Function that returns text representation of a cell address

Address( row, column, [ref_type], [ref_style], [sheet_name] )


Indirect - Function that returns cell value based on the given text address representation.

Indirect( string_reference, [ref_style] )


So, you can combine these 2 functions to achieve the above scenario.

Indirect( Address( cell1, cell2 ) )

Where cell1 and cell2 are user input cells.

No comments:

Post a Comment