Sum range with cell address of lookup result

Dev Rao

New Member
Joined
Oct 21, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Dear All,

I need to sum of a range where the first cell is the result of lookup and after that i have to make a range for sum.

Like

if =Cell(Address,vlookup)
if the vlookup result value consist in A1 cell
Then cell formula will give result as $a$1

Now i have to sum of above given cell $a$1 and $a$2

like Sum(Cell(Address, vlookup result) : $a$2
Please help in the same.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
You can't do it with lookup, but can with index and match, something on the basis of

=sum(index(lookup result range, match( lookup value, lookup match range, false)):$A$2)

If the result should always be the result of the vlookup plus the cell below it then you could use this more reliable method instead of a cell reference after index.

=sum(index(lookup result range, match( lookup value, lookup match range, false)+{0,1}))
 
Upvote 0
You can't do it with lookup
With XLookup technically you can since XLookup returns a Cell, but you would need to wrap it in an offset function to achieve the same results as your last formula with the +{0,1}. With Offset being volatile, I think your last formula is much better.
Excel Formula:
=SUM(OFFSET(XLOOKUP(110,$A$6:$A$11,$A$6:$A$11),0,0,2))
 
Upvote 0
but you would need to wrap it in an offset function to achieve the same results as your last formula
Actually, you can without offset ;)

Note that the results of the 2 methods will be different, the first will give the result of =SUM(C2,C4) while the second will give =SUM(C2:C4)
Excel Formula:
=SUM(XLOOKUP(A11,A2:A8,CHOOSE({1,2},C2:C8,C4:C10),))
Excel Formula:
=SUM(XLOOKUP(A11,A2:A8,C2:C8,):XLOOKUP(A11,A2:A8,C4:C10,))
 
Upvote 0

Forum statistics

Threads
1,214,838
Messages
6,121,885
Members
449,057
Latest member
Moo4247

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