Date Range based on Cell Value

Andy0311

Board Regular
Joined
Oct 16, 2019
Messages
118
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello,

I have a report (shown below) for auditing pay periods and the date a lesson was graded. In column D the first entry is 9/19/2019 (in red). Based on a date in column D, I need to key in the appropriate start date (column F) and end date (column G) for the value in column D. This is presently a manual process where someone looks at the value in column D, and looks in column K and column L to find the correct date range. The 9/19/2019 date falls between the 9/10/2019 to 9/24/2019 date range (see blue dates in columns K and L. I would like to automate the process so that a formula in column F and G would eliminate the keying by calculating the proper dates. I've tried IF statements, but can't get it right. Any help would be appreciated. Sorry the formatting in my example is sub standard. A

ABCDEFGKL
Student NameCourseLessonDate GradedMarkStartEndPay Periods

KatzMath Integrated Math III (1-18)Unit 18: First Semester Final9/19/2019B 9/10 9/24 StartEnd
KatzMath Integrated Math III (1-18)Unit 18: First Semester Final9/27/2019B+ 8/10/20198/24/2019
8/25/20199/9/2019
JonesMath Integrated Math III (1-18)Unit 6: Functions9/17/2019D- 9/10/20199/24/2019
JonesMath Integrated Math III (1-18)Unit 6: Functions9/27/2019D 9/25/201910/9/2019
10/10/201910/24/2019
BonnyMATH 170 (1-18)Unit 5: Exponents, Square Roots and Place Values9/12/2019F
BonnyMath 170 (1-18)Unit 5: Exponents, Square Roots and Place Values9/26/2019F

<colgroup><col><col><col><col><col><col><col><col span="3"><col><col></colgroup><tbody>
</tbody>
 

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.
How about


Book1
ABCDEFGHIJKL
1Student NameCourseLessonDate GradedMarkStartEndPay Periods
2KatzMath Integrated Math III (1-18)Unit 18: First Semester Final19/09/2019B10-Sep24-SepStartEnd
3KatzMath Integrated Math III (1-18)Unit 18: First Semester Final27/09/2019B+25-Sep09-Oct10/08/201924/08/2019
425/08/201909/09/2019
5JonesMath Integrated Math III (1-18)Unit 6: Functions17/09/2019D-10-Sep24-Sep10/09/201924/09/2019
6JonesMath Integrated Math III (1-18)Unit 6: Functions27/09/2019D25-Sep09-Oct25/09/201909/10/2019
710/10/201924/10/2019
8BonnyMATH 170 (1-18)Unit 5: Exponents, Square Roots and Place Values12/09/2019F10-Sep24-Sep
9BonnyMath 170 (1-18)Unit 5: Exponents, Square Roots and Place Values26/09/2019F25-Sep09-Oct
Specs
Cell Formulas
RangeFormula
F2=IFERROR(INDEX(K$3:K$7,MATCH($D2,K$3:K$7,1)),"")
G2=IFERROR(INDEX(L$3:L$7,MATCH($F2,$K$3:$K$7,1)),"")
 
Upvote 0
How about

ABCDEFGHIJKL
1Student NameCourseLessonDate GradedMarkStartEndPay Periods
2KatzMath Integrated Math III (1-18)Unit 18: First Semester Final19/09/2019B10-Sep24-SepStartEnd
3KatzMath Integrated Math III (1-18)Unit 18: First Semester Final27/09/2019B+25-Sep09-Oct10/08/201924/08/2019
425/08/201909/09/2019
5JonesMath Integrated Math III (1-18)Unit 6: Functions17/09/2019D-10-Sep24-Sep10/09/201924/09/2019
6JonesMath Integrated Math III (1-18)Unit 6: Functions27/09/2019D25-Sep09-Oct25/09/201909/10/2019
710/10/201924/10/2019
8BonnyMATH 170 (1-18)Unit 5: Exponents, Square Roots and Place Values12/09/2019F10-Sep24-Sep
9BonnyMath 170 (1-18)Unit 5: Exponents, Square Roots and Place Values26/09/2019F25-Sep09-Oct

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Specs

Worksheet Formulas
CellFormula
F2=IFERROR(INDEX(K$3:K$7,MATCH($D2,K$3:K$7,1)),"")
G2=IFERROR(INDEX(L$3:L$7,MATCH($F2,$K$3:$K$7,1)),"")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Thank you so much for your help on this, and the other times you have helped me. This solution was perfect and way beyond my scope of Excel knowledge, and saved me hours in time and frustration. Thanks, Fluff!

Andy
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,820
Members
449,049
Latest member
cybersurfer5000

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