ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Function that Returns address of that cell? (https://www.excelbanter.com/excel-worksheet-functions/71854-function-returns-address-cell.html)

RayWolfDog

Function that Returns address of that cell?
 
Is there a function (or combination of) that will return the address (useable
in another function) of the cell that the function is in? For my particular
project I cannot use any NAMES, or actual cell references (like putting "A1"
in cell A1), or VB code. It requires a very specific solution, essentially a
function (or combo of) that will return the address of the cell that the
function is in. It seems SO simple and yet is nowhere to be found by me yet.
HELP! THANKS!

Gary''s Student

Function that Returns address of that cell?
 
Function Gary()
Debug.Print Application.Caller.Address
MsgBox (Application.Caller.Address)
End Function


If the function has a range (single cell) as an argument like
Function asdf(r as range) as variant

Then r.Address will give the cell address




--
Gary''s Student


"RayWolfDog" wrote:

Is there a function (or combination of) that will return the address (useable
in another function) of the cell that the function is in? For my particular
project I cannot use any NAMES, or actual cell references (like putting "A1"
in cell A1), or VB code. It requires a very specific solution, essentially a
function (or combo of) that will return the address of the cell that the
function is in. It seems SO simple and yet is nowhere to be found by me yet.
HELP! THANKS!


Gary''s Student

Function that Returns address of that cell?
 
In the worksheet:

=ADDRESS(ROW(),COLUMN())

will also display the address
--
Gary''s Student


"RayWolfDog" wrote:

Is there a function (or combination of) that will return the address (useable
in another function) of the cell that the function is in? For my particular
project I cannot use any NAMES, or actual cell references (like putting "A1"
in cell A1), or VB code. It requires a very specific solution, essentially a
function (or combo of) that will return the address of the cell that the
function is in. It seems SO simple and yet is nowhere to be found by me yet.
HELP! THANKS!



All times are GMT +1. The time now is 06:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com