Function to return the reference of an array?

PATSYS

Well-known Member
Joined
Mar 12, 2006
Messages
1,750
Is there is a function that returns the reference of an array as a value? For example if I enter e.g. function(A1:B10) in C1, then the value in C1 will be "A1:B10".

Thanks
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Is there is a function that returns the reference of an array as a value? For example if I enter e.g. function(A1:B10) in C1, then the value in C1 will be "A1:B10".

Thanks
I don't understand this. You want "A1:B10" returned in a cell where you have typed "=somefunction(A1:B10)"? If this is so, why not just type "A1:B10" in the cell to start with.

The only other thing that I can think of so far that you might want is something like this:
=CELL("address",A1)&":"&CELL("address",B10)
This returns the range "$A$1:$B$10" but will adjust if row/columns are added/deleted.

If I have mis-interpreted (which I assume I have) please expand the explanation.
 
Upvote 0
Is there is a function that returns the reference of an array as a value? For example if I enter e.g. function(A1:B10) in C1, then the value in C1 will be "A1:B10".

Thanks
I don't understand this. You want "A1:B10" returned in a cell where you have typed "=somefunction(A1:B10)"? If this is so, why not just type "A1:B10" in the cell to start with.

The only other thing that I can think of so far that you might want is something like this:
=CELL("address",A1)&":"&CELL("address",B10)
This returns the range "$A$1:$B$10" but will adjust if row/columns are added/deleted.

If I have mis-interpreted (which I assume I have) please expand the explanation.

Yes you have interpreted correctly. The reason I want such a fucntion is to reduce possible error associated with me simply typing the range value manualy, especially that there are alot of ranges with I am trying to get the ref value of.

What I was doing was listing all the ranges in a sheet because I will be using it in the codes in VB.
 
Upvote 0

Forum statistics

Threads
1,226,498
Messages
6,191,374
Members
453,655
Latest member
lasvegasbuffet

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