Xlookup Vertical & horizontal with 3 criteria

kitsa

Board Regular
Joined
Mar 4, 2016
Messages
111
Office Version
  1. 365
  2. 2016
Hi,
I'm trying to get figures using Xlookup, but have got stuck with 3 criteria in vertical and horizontal:
E.g. Code - AA1, Start Date (20/01/23), End Date (23/01/23) = Sum (40), as per pic

Can someone help?

Thanks in advance
 

Attachments

  • excel pic.JPG
    excel pic.JPG
    41.4 KB · Views: 8

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
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’)

Also, for the future (to save helpers having to manually type sample data & therefore to get more helpers and faster results ;)):
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

You cannot get those results with XLOOKUP, but you can with SUMIFS (I have assumed that you made a mistake with the row 3 result)

23 02 28.xlsm
BCDEFGHIJKLMN
1StartEndTotal20/01/202321/01/202322/01/202323/01/202324/01/202325/01/202326/01/202327/01/2023
220/01/202323/01/2023401010101010101010
321/01/202324/01/2023802020202020202020
424/01/202327/01/20231203030303030303030
SUMIFS
Cell Formulas
RangeFormula
D2:D4D2=SUMIFS(G2:N2,G$1:N$1,">="&B2,G$1:N$1,"<="&C2)
 
Upvote 0
Hi Peter,
Thanks for the info. I have updated my details now to support. I'm unsure how to do the XL2BB add-in, your information is too complex to me, but I'm sure I will work it out.
With your code it works for to criteria dates, but I need to match code (A:A) and (F:F) first, then the two dates to get the figures.
 
Upvote 0
I have updated my details
Great, thanks for that. (y)

but I need to match code (A:A) and (F:F) first, then the two dates to get the figures.
Then I think that you need to give us a better representative set of sample data and expected results.


I'm unsure how to do the XL2BB add-in
Try to carefully follow through the steps outlined in the link provided. Use the Test Here forum to try it out.
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,289
Members
449,077
Latest member
Rkmenon

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