Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88868

Matching ID, vlookup a value that falls between 2 sets of dates

$
0
0

I have 2 tables that I need to combine the data based on BeaconCode and range of dates:

Table #1: Contains all the events and its latitude and longitude. It will have multiples log through various dates. There is about 1,000 different BeaconCode.

Table #2: Capture the known locations once and next entry will only capture if the asset has moved to another location.

Example: If the asset was seen on 6/18/2019 at one place and the next update is on 09/27/2019. It will show only 2 events. Event#1: the place from 06/18/2019 and Event#2 on 09/27/2019, it could also be blank.

I have to assume that all events from table#1 between 06/18/2019 to 09/26/2019 occurred at the same place as mention in table#2 on 06/18/2019 up to 09/26/2019 since on 09/27/2019 another event happen.

The formula would need to consider the fact that both tables has multiples beaconcode and would need to compare only the beaconcode universe.

So vlookup with ending TRUE didn't work for me since table contains multiples events in the same date.

Please help!

enter image description here

=VLOOKUP(B2,H:I,2,TRUE)

I expect the formula to bring the location between the 2 dates on table#1.


Viewing all articles
Browse latest Browse all 88868


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>