Find invoice price based on location, item#, effective start and end date

phass001

New Member
Joined
Oct 31, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello everyone, having some difficulty finding a formula to meet all the criteria. I have spent some time searching and appreciate any help on this ask. I am trying to find the corresponding price, based on location, item, and between the date range. From the picture below, I am trying to write a formula in cell J2 to get the correct price $23.25. Thank you!

Book4
ABCDEFGHIJ
1LocationItem#Start Date End DatePriceLocationItem#Invoice DatePrice
2BEN351351/1/202112/15/2022$ 23.00BEN3513510/31/2023$ 23.25
3SIG351351/1/202112/15/2022$ 23.50
4LAX351351/1/202112/15/2022$ 24.00
5BEN351352/16/202311/15/2023$ 23.25
6SIG351352/16/202311/15/2023$ 23.75
7LAX351352/16/202311/15/2023$ 24.50
8BEN499992/16/202311/15/2023$ 28.00
9SIG499992/16/202311/15/2023$ 28.25
10LAX499992/16/202311/15/2023$ 28.95
11BEN3513512/16/20222/15/2023$ 23.10
12SIG3513512/16/20222/15/2023$ 23.25
13LAX3513512/16/20222/15/2023$ 24.15
Sheet4
 

Attachments

  • Capture.PNG
    Capture.PNG
    19.3 KB · Views: 17

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Hi phass001,

Welcome to MrExcel!!

Based on the formula from here this will do the job for you:

=INDEX($E$2:$E$13,MATCH(1,(G2=$A$2:$A$13)*(H2=$B$2:$B$13)*(I2>=$C$2:$C$13)*(I2<=$D$2:$D$13),0))

Regards,

Robert
 
Upvote 0
Hi phass001,

Welcome to MrExcel!!

Based on the formula from here this will do the job for you:

=INDEX($E$2:$E$13,MATCH(1,(G2=$A$2:$A$13)*(H2=$B$2:$B$13)*(I2>=$C$2:$C$13)*(I2<=$D$2:$D$13),0))

Regards,

Robert
Thank you Robert, appreciate the quick reply. The formula does work, however when I am using the formula in my larger dataset, and the file has become unresponsive and is stuck on calculating threads. Is there any other workaround you may suggest. Thank you
 
Upvote 0
Is there any other workaround you may suggest.
No I can't I'm afraid :( but hopefully someone on the forum can :)

It is an array formula which are notorious for slowing Excel down so make sure you don't reference entire columns but the range you're working with as I have done which may help.
 
Upvote 0
How about
Excel Formula:
=FILTER(E2:E10000,(A2:A10000=G2)*(B2:B10000=H2)*(C2:C10000<=I2)*(D2:D10000>=I2))
 
Upvote 0

Forum statistics

Threads
1,223,713
Messages
6,174,043
Members
452,542
Latest member
Bricklin

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