Use time as a criteria.... but with +/- 5%

RockandGrohl

Well-known Member
Joined
Aug 1, 2018
Messages
788
Office Version
  1. 2010
Platform
  1. Windows
Hi guys, I'm using the lovely mutli-critiera Index-Match as seen here:

Excel formula: INDEX and MATCH with multiple criteria | Exceljet

In one column I'm matching Date to date, in another column I'm matching currency value to value, and in the third criteria I need to match time.

The problem is that the two systems recorded time with slightly different values, so 05:12:24 on one is 05:13:43 on the other - they never appear to be more than 3 minutes out.

In this particular set of data, it's very, very rare that two users will have the same transaction value on the same date and within the same timeframe (3 mins or so), so I'd like the index-match to positively match someone where the date, value and time matches, but within +/- 5% of the time. (which should be 3 minutes, right?)


Thanks!
 
Like this?

=INDEX(E5:E11,MATCH(1,(B5:B11=H5)*(C5:C11=H6)*(D5:D11>=H7-TIME(0,2,0))*(D5:D11<=H7+TIME(0,2,0)),0))}
 
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,214,592
Messages
6,120,433
Members
448,961
Latest member
nzskater

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