Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel's ADDRESS function

Status
Not open for further replies.

waterguy

Civil/Environmental
Jan 9, 2001
47
I have scoured the Excel help files and tried a variety of different things for what I thought was an easy task, and perhaps it is, but I'm just missing something.

If I enter =ADDRESS(1,1) in a cell it returns "$A$1" as expected.

Now, What I'm really interested in is the value located in the $A$1 cell. I had tried nesting the ADDRESS function within a number of other text and lookup/reference functions but have been unsuccessful.

Does the fact the the ADDRESS function creates the cell reference as text mean that it can't be used as true cell reference ?

I hope this hasn't been too confusing to understand ?
 
Replies continue below

Recommended for you

waterboy,
Use function
Code:
INDIRECT
for your purposes. Statement
Code:
=INDIRECT(ADDRESS(1,1))
will give you the value in cell
Code:
$A$1
.

yakpol
 
Why not simply enter =$A$1 or maybe =A1?

One possible reason for using INDIRECT(ADDRESS.. could be that col and row values are available - and need to be entered into the formula.

What I'm trying to say is that INDIRECT(ADDRESS.. not a very efficient way to find values of cells - Using INDIRECT(ADDRESS(1,1)) is analogous to multiplying and then dividing a number with a constant to get back the original number. ADDRESS returns a string of a reference and INDIRECT(ADDRESS.. converts it back to a reference.

If Row-Col values are available and HAVE to be used it may be better to try =OFFSET($A$1,Row-1,Col-1).

You might check out the relative efficiency of all three methods by entering say 50000 formulas by each of the three methods and comparing the time taken to calculate the sheet.

Of course occasional use of such a construct will not matter at all. What I wish to drive home is that we should try to avoid developing the habit of using not-very-efficient formulas - it'll help in the long run.

 
Waterguy,

Did you ever solve your ADDRESS function problem? I am running into the exact same problem. Am trying to nest the ADDRESS function within COUNTA as my ranges vary. I am trying to analyze a data dump. I need to calculate the row number and column number and once these are known, create the cell reference. Have had no success and as you have found, the ADDRESS output as a text string proves to be its undoing. Help!
 
I'm not sure I remember exactly what I did some time ago on a spreadsheet, but I used a combination of MATCH() AND INDEX() to work with values in a table. I think it was nested like this: INDEX(MATCH(),MATCH()).

See if either of those two can do what you need.
 
Try this thread also: thread770-4832
 
All,

FYI, I find the following web site to have excellent information regarding Excel and VBA. Additionally, there are links to other web sites that may be of use to you.


Good Luck.
 
Hi

I think Mala's formula is much better

Nitin Patel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor