Adress of "source" cell determined by if statement

floshkit

New Member
Joined
Aug 31, 2011
Messages
2
<table><tbody><tr><td class="votecell">
</td> <td class="postcell"> i have a cell (lets call it A1) which uses an if statement to determine its content. i.E:

<code>=IF(SheetName!H9="";SheetName!H$3;IF(SheetName!I9="";SheetName!I$3;IF(SheetName!J9="";SheetName!J$3;IF(SheetName!K9="<>";SheetName!K$3;"stopped"))))
</code> so depending on which statement turns out to be true, the cell A1 will be populated with different content.
so far so good.
now i need to find out the actual adress of the cell that A1 is pulling its contents from.
What function would i use to return the adress of the cell whos content is being displayed in A1?
i did my homework, looked, used the search function on here and many hours have been spent on not finding the answer i need. i found tons of other useful insights into excel, but this problem remains unsolved.
thank you very much


</td></tr></tbody></table>
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
welcome to the board

there is no specific function that does this exactly, but it is possible in various ways. You will need to duplicate the formula, to ask the same set of questions. Instead of returning the cell contents, you want it to return something else

1) put "" around the cell name. This is not good, because you are creating text, which won't update if you move the cell, you'll be getting the wrong abnswer in no time

2) replace the reference with ADDRESS(ROW(reference),COLUMN(reference)). Works, but is clumsy and difficult to read, especially with long formulas

3) create a VBA function addressA1 and replace reference with a new function called e.g. addressA1(reference)

In a standard VBA code module, place the following code:
Code:
Function addressA1(target As Range)
addressA1 = target.Address
End Function

EDIT
d'oh! forgot CELL...!
hangs head in shame for overcomplicating things...
 
Upvote 0
Tank you all.
VB will not work, since its to be collaborated on using google docs and google docs does not know how to handle macros. thank you for your answers. seems like its more involved than i had hoped it would be..
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,845
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top