Return a value right before and after a specified date

Drwats0n

New Member
Joined
Dec 10, 2015
Messages
46
Hi Guys, need your help with the following requirement.

I wish to return a value of 0.1 and 0.2 based on the specified date of 27th July.
As you can see 0.1 and 0.2 is in between the specified date of 27th July.
Can you please help me with this please? Thanks in advance.


[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]Period[/TD]
[TD]Rate[/TD]
[TD][/TD]
[TD]Date[/TD]
[TD]27 July 18[/TD]
[/TR]
[TR]
[TD]10 July 18[/TD]
[TD]0.1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3 August 18[/TD]
[TD]0.2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4 Sept 18[/TD]
[TD]0.3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Looks like you are asking for the following...


Book1
ABCDEFG
1PeriodRateDate27-Jul-180.10.2
210-Jul-180.1
33-Aug-180.2
44-Sep-180.3
Sheet1


In F1 control+shift+enter, not just enter:

=VLOOKUP(MAX(IF($A$2:$A$4<=E1,$A$2:$A$4)),$A$2:$B$4,2,0)

In G1 control+shift+enter, not just enter:

=VLOOKUP(MIN(IF($A$2:$A$4>=E1,$A$2:$A$4)),$A$2:$B$4,2,0)

If the MAXIFS and MINIFS functions are available on your Excel system...

In F1 just enter:

=VLOOKUP(MAXIFS($A$2:$A$4,$A$2:$A$4,"<="&E1),$A$2:$B$4,2,0)

In G1 just enter:

=VLOOKUP(MINIFS($A$2:$A$4,$A$2:$A$4,">="&E1),$A$2:$B$4,2,0)
 
Upvote 0

Forum statistics

Threads
1,225,750
Messages
6,186,805
Members
453,373
Latest member
Ereha

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