SEARCH TEXT BETWEEN DATES

IGORRRRR

New Member
Joined
Oct 19, 2022
Messages
5
Office Version
  1. 2007
Platform
  1. Windows
Good morning,

I need the help to solve a problem.

I need to search one text in a table with a range of date:

Supplier Date Value
A 19/10/2022 Madrid
A 05/10/2022 Barcelona
B 17/10/2022 Zaragoza
B 09/10/2022 Sevilla

Table when searching:

Supplier Initial Date Final Date Value
A 15/10/2022 20/10/2022 Madrid
A 01/10/2022 14/10/2022 Barcelona
B 10/10/2022 29/10/2022 Zaragoza
B 01/10/2022 09/10/2022 Sevilla

Thanks in advance
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Your explanation is very vague. Please explain your needs in addition to your presentation.
 
Upvote 0
Sorry for the explanation;

I have a table 1 with the following information:

Table 1
SupplierInitial DateFinal DateValue
A15/10/202220/10/2022Madrid
A01/10/202214/10/2022Barcelona
B10/10/202229/10/202Zaragoza
B01/10/202209/10/202Sevilla

What I expect is when I introduce the supplier and the date in the table 2, automatically and with a formule search the value of the table 1 depending of the intervale of dates and supplier:

Table 2
SupplierDateValue
A19/10/2022Madrid
A05/10/2022Barcelona
B17/10/2022Zaragoza
B09/10/2022Sevilla

I insert one image to undertand better the problem.

I found one solution but only works with numeric values, not when I search one text.

Thanks in advance
 

Attachments

  • Example Excell Image.jpg
    Example Excell Image.jpg
    97.7 KB · Views: 27
Upvote 0
Assuming that only one row in the first table will satisfy the criteria, try this.

22 10 27.xlsm
ABCDEFGH
1SupplierInitial DateFinal DateValueSupplierDateValue
2A15/10/202220/10/2022MadridA19/10/2022Madrid
3A1/10/202214/10/2022BarcelonaA5/10/2022Barcelona
4B10/10/202229/10/2022ZaragozaB17/10/2022Zaragoza
5B1/10/20229/10/2022SevillaB9/10/2022Sevilla
Lookup
Cell Formulas
RangeFormula
H2:H5H2=INDEX(D:D,SUMPRODUCT(--(A$2:A$5=F2),--(B$2:B$5<=G2),--(C$2:C$5>=G2),ROW(D$2:D$5)))
 
Upvote 0
Solution
You're welcome. Thanks for the confirmation. :)
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,138
Members
453,021
Latest member
Justyna P

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