Adding a sum function to my Vlookup/Hlookup

Quinn11

New Member
Joined
Sep 26, 2017
Messages
4
Office Version
  1. 365
I am trying to add a sum function to my lookup formula. =VLOOKUP($G11,$A$7:$D$12,HLOOKUP($H$5,$B$5:$D$6,2,FALSE),FALSE)

I am trying to Lookup the number in column G in the main table and return the result depending on when I change H5
 

Attachments

  • Screenshot 2023-08-18 112657.png
    Screenshot 2023-08-18 112657.png
    17.8 KB · Views: 26

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
I'm on 365. Thanks for the heads up
 
Upvote 0
Thanks for that.
How about
Excel Formula:
=SUMIFS(XLOOKUP($H$5,$B$5:$D$5,$B$7:$D$12),$A$7:$A$12,G8)
 
Upvote 0
.. or you can do them all with a single formula like this

23 08 18.xlsm
ABCDEFGH
5RedYellowGreenRed
6
7601101120
860220122060110
960330132060220
1060540142060330
11605501520605150
12605601620
SUM
Cell Formulas
RangeFormula
H8:H11H8=BYROW(G8:G11,LAMBDA(r,SUMIFS(INDEX(B7:D12,0,MATCH(H5,B5:D5,0)),A7:A12,r)))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,575
Messages
6,179,637
Members
452,934
Latest member
Jdsonne31

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