Which formulas can return a cell reference instead of its value?

excelos

Well-known Member
Joined
Sep 25, 2011
Messages
591
Office Version
  1. 365
Platform
  1. Windows
Hello

Which formulas can return a cell reference instead of its value?

I know INDEX can do that, any other?

I want to particularly know the formulas that I can use them in a way of SUM(FORMULA():A2) etc

Thanks!
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
That's a fairly broad request. It would help to know what you are trying to calculate.

Offhand the ones I can think of are:

OFFSET
INDIRECT

Also UDFs can be written to return whatever you want, including a range.
 
Upvote 0
Thanks but unfortunately both of these are volatile thus a no-go. Any other? Or any other way to parse a lookup/calculation as a cell reference?
 
Upvote 0
Those are pretty much your options.
 
Upvote 0
I think this might demonstrate what you are referring to for both Index & XLookup ie the return value is a cell reference that can be used in another function such as Sum.

20220404 Functions that return an address.xlsm
ABCDEFGHIJ
1IndexAmtFromToTotalFunctionFormula
2a1000Sumce60<-- Index=SUM(INDEX($B$2:$B$8,MATCH(F2,$A$2:$A$8,0),0):INDEX($B$2:$B$8,MATCH(G2,$A$2:$A$8,0),0))
3b200060<-- XLookup=SUM(XLOOKUP(F2,$A$2:$A$8,$B$2:$B$8):(XLOOKUP(G2,$A$2:$A$8,$B$2:$B$8)))
4c10
5d20
6e30
7f4000
8g5000
Test
Cell Formulas
RangeFormula
H2H2=SUM(INDEX($B$2:$B$8,MATCH(F2,$A$2:$A$8,0),0):INDEX($B$2:$B$8,MATCH(G2,$A$2:$A$8,0),0))
H3H3=SUM(XLOOKUP(F2,$A$2:$A$8,$B$2:$B$8):(XLOOKUP(G2,$A$2:$A$8,$B$2:$B$8)))
J2:J3J2=FORMULATEXT(H2)


And in VBA to show both function can have the "Address" Property.

VBA Code:
Sub FunctionsReturningAddress()

    Debug.Print "Index Address " & Application.Index(Range("$B$2:$B$8"), Application.Match(Range("F2").Value, Range("$A$2:$A$8"), 0), 0).Address
  
    Debug.Print "XLookup Address " & Application.XLookup(Range("F2").Value, Range("$A$2:$A$8"), Range("$B$2:$B$8")).Address

End Sub

Which shows in the immediate window
Index Address $B$4
XLookup Address $B$4
 
Upvote 0

Forum statistics

Threads
1,214,657
Messages
6,120,764
Members
448,991
Latest member
Hanakoro

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