Lookup value from range when name matches AND date falls within date range

eagerexceler

New Member
Joined
Jan 10, 2017
Messages
34
Office Version
  1. 2016
Platform
  1. Windows
Hello!

I have two sheets within a spreadsheet: Report and Rates. Report contains an account listing with a concatenated name in column S and a start date in column H. Within Rates I have triplicate rows containing the same concatenated name for each time frame in column F. Column G of the sheet contains the start date for the period - 9/1/2021, 9/1/2022, 9/1/2023 while column H contains the end date for each respective period -8/31/2022, 8/31/2023, 8/31/2024. Lastly, in the same sheet, column J has a corresponding value for each row. What I need is to return the value from column J in Rates when the common name in from S of Report matches that of Column F in Rates AND the admit date from column H of Report falls within the date range listed in columns G and H in CHIRP Rates. I want the value to be returned into column T of my Report tab.

I've attached screenshots of the two sheets. Sorry, I can't upload XL2BB since I'm at work.

Thanks for any help!
 

Attachments

  • Report.png
    Report.png
    7.1 KB · Views: 25
  • Rates.png
    Rates.png
    11.5 KB · Views: 25

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
The latest formula I've been using is INDEX('Rates'!J2:J43,MATCH(1,(('Rates'!F2:F43='Report'!S3)*('Rates'!G2:G43>='Report'!H3)*('Rates'!H2:H43<='Report'!H3)),0)) in array form, but I'm only returning #N/A, which is incorrect. Do I need to simplify my 'Rates' table? Is that throwing a wrench in my Matches?
 
Upvote 0
Give this a try:
Excel Formula:
=LOOKUP(2,1/((Rates!F2:F43=S3)*(Rates!G2:G43<=H3)*(Rates!H2:H43>=H3)),Rates!J2:J43)
 
Upvote 0
Solution

Forum statistics

Threads
1,215,076
Messages
6,122,983
Members
449,092
Latest member
Mr Hughes

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