Time Constraints

silentlenny07

New Member
Joined
Dec 22, 2017
Messages
4
So I'm not sure how to solve my problem or what formula would be best:

I am copying a scanned image of a schedule from PDF, that I have recognized text on, to my excel product. I paste the data into certain cells and it should auto-calculate things for me. My issue comes from tracking the earliest and latest start and stop times for each round. All time is measured in 24-hour time for simplicity sake. Formulas and arrays I've tried are below and I have created a sample of my table below:

=MAX(IF($E$54:$E$75=1,$I$54:$I$75))
=MIN(IF($E$54:$E$75=1,$H$54:$H$75))
=MAX(IF($E$54:$E$75=2,$I$54:$I$75))
=MIN(IF($E$54:$E$75=2,$H$54:$H$75))
=MAX(IF($E$54:$E$75=3,$I$54:$I$75))
=MIN(IF($E$54:$E$75=3,$H$54:$H$75))

These arrays worked only if I manually typed each date into the cells. I did not work with the copy and paste function. I tried different formats, (time, text, general, and custom formats for 24-hour time 00\:00). When I paste the copy it renders it as general in the cells, I've tried after the copy to convert the format, to no avail. I've tried converting the PDF to word and then copying and pasting. I also copy with formatting to keep the cell spacing, which works well.

=TIME(LEFT(I54,2),RIGHT(I54,2),)
=RIGHT(H54,5)

I have no control over how the PDF comes or is created. I don't care where the results go on the sheet, but I will reference them on another sheet after the problem is solved. Any assistance would be greatly appreciated. Thank you in advance.

Sample Table
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Round[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Start[/TD]
[TD]Stop[/TD]
[TD] [/TD]
[TD]Sample Results[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]0900[/TD]
[TD]1000[/TD]
[TD][/TD]
[TD]0900[/TD]
[TD]Earliest[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]0915[/TD]
[TD]1015[/TD]
[TD][/TD]
[TD]1015[/TD]
[TD]Latest[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]0910[/TD]
[TD]1010[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]0915[/TD]
[TD]1015[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD]1100[/TD]
[TD]1200[/TD]
[TD][/TD]
[TD]1100[/TD]
[TD]Earliest[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD]1110[/TD]
[TD]1210[/TD]
[TD][/TD]
[TD]1215[/TD]
[TD]Latest[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD]1115[/TD]
[TD]1215[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD]1100[/TD]
[TD]1200[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]1500[/TD]
[TD]1600[/TD]
[TD][/TD]
[TD]1500[/TD]
[TD]Earliest[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]1505[/TD]
[TD]1605[/TD]
[TD][/TD]
[TD]1645[/TD]
[TD]Latest[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]1500[/TD]
[TD]1600[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]1545[/TD]
[TD]1645[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

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.
Hi, welcome to the forum!

Your start and stop values are probably text - here is an alternative you can try that attempts to convert them to numbers.


Excel 2013/2016
EFGHIJKL
1RoundStartStop
2109001000900Earliest
31091510151015Latest
4109101010
5109151015
62110012001100Earliest
72111012101215Latest
8211151215
9211001200
103150016001500Earliest
113150516051645Latest
12315001600
13315451645
Sheet1
Cell Formulas
RangeFormula
K2=AGGREGATE(15,6,(0+$H$2:$H$100)/($E$2:$E$100=1),1)
K3=AGGREGATE(14,6,(0+$I$2:$I$100)/($E$2:$E$100=1),1)
 
Upvote 0
It works for rounds 1 and 2, couldn't figure out how to make it work for round 3.

Hi, you need to see if you can figure out what is different about either the round 3 values or there corresponding time values, for example do they have hidden spaces at the beginning or end?

If you can let us know, we may be able to suggest a workaround.
 
Upvote 0
=AGGREGATE(15,6,(0+$H$116:$H$140)/($E$116:$E$140=1),1)
=AGGREGATE(14,6,(0+$I$116:$I$140)/($E$116:$E$140=1),1)

Thank you for your help, these are the formulas that worked out well. I was gone for the holidays.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,874
Members
452,363
Latest member
merico17

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