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: 18

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
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,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

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