VLOOKUP IF AND

ExcelNooberino

New Member
Joined
Jan 2, 2019
Messages
43
Office Version
  1. 2016
Platform
  1. Windows
Hi there folks!

So I've been trying to come up with a file that could help me to verify some data quickly that I've been doing and it's something like this: I need to validate if the batch of a specific product that was shipped respects the FEFO rule, I mean, first expired, first out. For that I need to extract some data from our system and cross info with the shipped products. The thing is, I need a formula that allows me to lookup the date of a specific product code and a specific batch because, a batch can be used in more than one code with different expiration dates. I don't know if I'm making myself really clear but basically I want it to return the correspondig expiration date of a specific product code & batch.

1605635505653.png
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Assuming your headers are in columns A:G, try the Inputs and Result (formula) below.

ProductDescriptionBoxesBatchExp DateStatusSSCC
300398​
Example A
65​
794563​
24-Apr-2022​
OK
384245365626001​
301711​
Example B
65​
794563​
26-Oct-2021​
OK
384245365626111​
Inputs
Product
300398​
Batch
794563​
Result=SUMPRODUCT(--($A$2:$A$3=$B$7),--($D$2:$D$3=$B$8),$E$2:$E$3)
 
Upvote 0
I actually made it by using a little trick with the CONCATENATE formula, putting together both the product and batch codes and using VLOOKUP through that extra cell :)
 
Upvote 0

Forum statistics

Threads
1,215,450
Messages
6,124,912
Members
449,195
Latest member
Stevenciu

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