Matching dates in Formula

DrH100

Board Regular
Joined
Dec 30, 2011
Messages
78
I was given a formula (I don't understand it at all but it did what i needed at the time)

=IF(ISBLANK(F7)," ",INDEX($R$6:$R$59, MATCH(MIN(ABS($R$6:$R$59-$B$10)), ABS($R$6:$R$59-$B$10), 0)))

What it does ( I think) is look through a list of dates (R6:R59) for the nearest date to that in B10. Which was brilliant at the time but now I need to change it so that if the date it finds in the list is the same as B10 it moves to the date above it in the list. I still need it to do what it is already doing if the dates don't match.

I don't know if it is possible to alter the formula at all to make this happen.

Hopefully my explanation is understandable !!

Many thanks in advance
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Try:

=IF(ISBLANK(F7)," ",IF(COUNTIF($R$6:$R$59,$B$10),INDEX($R$6:$R$59,MATCH($B$10,$R$6:$R$59,FALSE)-1),INDEX($R$6:$R$59, MATCH(MIN(ABS($R$6:$R$59-$B$10)), ABS($R$6:$R$59-$B$10), 0))))

confirmed with Ctrl+Shift+Enter.
 
Upvote 0

Forum statistics

Threads
1,214,378
Messages
6,119,188
Members
448,873
Latest member
jacksonashleigh99

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