Checking if a value exists within a range of other values

YorkiePud

New Member
Joined
Mar 14, 2025
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Good evening

I am trying to build a mechanism within a spreadsheet to cross check remaining stocks of a product against the original list of items that were booked in. The complexity comes from the fact that the products are purchased in a serialised range and the stock figures show which serial numbers are remaining (along with the quantities).

I'm trying to find a way to cross check the remaining serial numbers in stock (in the table on the right hand side of the example shown below) vs what was originally ordered so that I can populate the column in yellow. Does anyone know how I can do this?

Serialised stock question.png
 
To make sure we understand, please mock up the yellow column with the expected results. Also, it would be beneficial if you reposted your tables using XL2BB. We cannot manipulate data in a picture. The current presentation requires us to re-enter all your data which is time consuming. Help us to help you by making it easy for us to get you a solved response.
 
Upvote 0
Hello, not sure if I understand it correctly, so it is a trial and error:

Excel Formula:
=MAP(B2:B31,C2:C31,LAMBDA(x,y,SUM((K2:K15>=x)*(L2:L15<=y)*(M2:M15))))
 
Upvote 0
Apologies for forgetting to address the numbers as text problem, please ignore #3:

Excel Formula:
=MAP(B2:B31*1,C2:C31*1,LAMBDA(x,y,SUM((K2:K15*1>=x)*(L2:L15*1<=y)*(M2:M15*1))))
 
Upvote 0
Solution
@hagia_sofia : thank you so much. That solution is incredible and works well. As @alansidman said, I didn't help by only providing you with a picture (apologies, this is my first post and didn't think it through) so I'm very grateful that you worked out a solution for this

 
Upvote 0

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