Index Match with time range criteria?

sleeplab

New Member
Joined
May 31, 2018
Messages
1
The Problem
So the raw data I'm using looks like this:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Time[/TD]
[TD]Activity[/TD]
[TD]Code[/TD]
[/TR]
[TR]
[TD][TABLE="width: 124"]
<tbody>[TR]
[TD="class: xl64, width: 124"]8/31/2017 [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]16:05[/TD]
[TD]10[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]8/31/2017 [/TD]
[TD]17:13[/TD]
[TD]5[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]9/1/2017[/TD]
[TD]15:00[/TD]
[TD]1[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]

And I'm trying to format it to look like this:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Activity_15:00[/TD]
[TD]Code_15:00[/TD]
[TD]Activity_16:00[/TD]
[TD]Code_16:00[/TD]
[TD]Activity_17:00[/TD]
[TD]Code_17:00[/TD]
[/TR]
[TR]
[TD]8/31/2017 [/TD]
[TD][/TD]
[TD][/TD]
[TD]10[/TD]
[TD]7[/TD]
[TD]5[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]9/1/2017[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Criteria: Timestamp on the code must be within 15 minutes of the hour

So I figured I'd use an index match to compare the time stamp to an independent table with times (ie. 15:45/16:15). However I'm running into problems trying to create an array, and being able to select both the activity value, and code value.

Am I using the correct function with a index match, or vlookup?

Thanks.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
It is hard to build a formula that uses the values in the first row. If you can rearrange your values in the first row?

Date Activity_15:00 Code_15:00 Activity_16:00 Code_16:00 Activity_17:00 Code_17:00

to something like this:

Activity_15:00 Activity_16:00 Activity_17:00
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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