denmarie84
New Member
- Joined
- Sep 10, 2015
- Messages
- 5
Hi,
I have been trying to create a formula that will return a value from a table if it is within a range of dates. I have tried several different formulas based on answers to similar questions, but none seem to work for some reason. Here is a a summary of my table. I want to return the value from column F if the sample date falls between the beg date and the end date.
[TABLE="width: 500"]
<tbody>[TR]
[TD]
[TABLE="width: 82"]
<tbody>[TR]
[TD="class: xl67, width: 82"]SampleDate[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 52"]
<tbody>[TR]
[TD="class: xl67, width: 52"]Yr-type[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD] [/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]Beg date[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]End date[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl67, width: 64"]Yr-type[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 82"]
<tbody>[TR]
[TD="class: xl67, width: 82"]1/4/1995[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]10/1/1994[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]9/30/1995[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 82"]
<tbody>[TR]
[TD="class: xl67, width: 82"]10/3/1996[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]10/1/1995[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]9/30/1996[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 82"]
<tbody>[TR]
[TD="class: xl67, width: 82"]9/30/1997[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]10/1/1996[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]9/30/1997[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 82"]
<tbody>[TR]
[TD="class: xl67, width: 82"]5/6/1998[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]10/1/1997[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]9/30/1998[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 82"]
<tbody>[TR]
[TD="class: xl67, width: 82"]12/1/1998[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]10/1/1998[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]9/30/1999[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Here are some examples of formulas I've tried:
=INDEX($F$2:$F$6,MATCH(1,IF(A2>=$D$2:$D$6,IF(A2<=$E$2:$E$6,1)),0))
[as an array - ctrl/shift/enter]
returns #n/a
=INDEX($F$2:$F$6, SUMPRODUCT(--(A2<=$D$2:$D$6), --(A2>=$E$2:$E$6), ROW(D2:D6)))
returns each cell of column F in order, regardless of the input date
Any help would be appreciated, thanks!!
I have been trying to create a formula that will return a value from a table if it is within a range of dates. I have tried several different formulas based on answers to similar questions, but none seem to work for some reason. Here is a a summary of my table. I want to return the value from column F if the sample date falls between the beg date and the end date.
[TABLE="width: 500"]
<tbody>[TR]
[TD]
[TABLE="width: 82"]
<tbody>[TR]
[TD="class: xl67, width: 82"]SampleDate[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 52"]
<tbody>[TR]
[TD="class: xl67, width: 52"]Yr-type[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD] [/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]Beg date[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]End date[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 64"]
<tbody>[TR]
[TD="class: xl67, width: 64"]Yr-type[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 82"]
<tbody>[TR]
[TD="class: xl67, width: 82"]1/4/1995[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]10/1/1994[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]9/30/1995[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]A[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 82"]
<tbody>[TR]
[TD="class: xl67, width: 82"]10/3/1996[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]10/1/1995[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]9/30/1996[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 82"]
<tbody>[TR]
[TD="class: xl67, width: 82"]9/30/1997[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]10/1/1996[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]9/30/1997[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 82"]
<tbody>[TR]
[TD="class: xl67, width: 82"]5/6/1998[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]10/1/1997[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]9/30/1998[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]
[TABLE="width: 82"]
<tbody>[TR]
[TD="class: xl67, width: 82"]12/1/1998[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]10/1/1998[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]
[TABLE="width: 68"]
<tbody>[TR]
[TD="class: xl67, width: 68"]9/30/1999[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Here are some examples of formulas I've tried:
=INDEX($F$2:$F$6,MATCH(1,IF(A2>=$D$2:$D$6,IF(A2<=$E$2:$E$6,1)),0))
[as an array - ctrl/shift/enter]
returns #n/a
=INDEX($F$2:$F$6, SUMPRODUCT(--(A2<=$D$2:$D$6), --(A2>=$E$2:$E$6), ROW(D2:D6)))
returns each cell of column F in order, regardless of the input date
Any help would be appreciated, thanks!!