InstructorAmberA
New Member
- Joined
- Oct 15, 2018
- Messages
- 7
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]row/column[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]--->[/TD]
[TD]BD ---->[/TD]
[TD]BI[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]Start[/TD]
[TD]End[/TD]
[TD]Target[/TD]
[TD][/TD]
[TD]TimeHour[/TD]
[TD]Target[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]3:00 AM[/TD]
[TD]6:00 AM[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]12:00 AM[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]1:00 AM[/TD]
[TD]6:00 AM[/TD]
[TD]4[/TD]
[TD][/TD]
[TD]1:00 AM[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]4:00 AM[/TD]
[TD]6:00 AM[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]2:00 AM[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]4:00 AM[/TD]
[TD]7:00 AM[/TD]
[TD]3[/TD]
[TD][/TD]
[TD]3:00 AM[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD]1:00 AM[/TD]
[TD]5:00 AM[/TD]
[TD]4[/TD]
[TD][/TD]
[TD]4:00 AM[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]17[/TD]
[TD]9:00 PM[/TD]
[TD]12:00 AM[/TD]
[TD]5[/TD]
[TD][/TD]
[TD]5:00 AM[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD] |[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]6:00 AM[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD] |[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]keeps going hour by hour[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]35[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]11:00 PM[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Goal: Make the Red cells calculate themselves. Max TARGET (BI) based On block of time shown in C to D .
Range BD12-BD35 (TimeHour)= Hours of the day (1 cell per hour)
BI12-BI35 (Target) are the Targets for those hours individually. Columns BE-BH have other data not relevant to this formula.
E12 -E17 is filled out manually. It is the highest (Target) number in the range of time shown. Example 3am, 4am, 5am hours are target 2, 2, 2, so give me E12=2
Row 16 - 1AM to 5AM, 1AM=4, 2AM = 3, 3AM=3, 4AM=2 so highest target is 4, give me 4.
{=MAX(IF($BD$12:$BD$40>=C12,IF($BD$12:$BD$40=D12,$BI$12:$BI$40)))} is giving me 0 in every cell. I did use CSE to enter it and it provided the { }. I typed them here for your reference.
Bad Result = 0 for everything. I originally had the table BD-BI on another worksheet called Sheet5 in this formula. I copied it over to the main page to see if it would change, but still zeros.
=MAX(IF((Sheet5!$A$4:$A$27<=D12)*(Sheet5!$A$4:$A$27>=C12),Sheet5!$F$4:$F$27,""))
https://www.mrexcel.com/forum/excel-questions/509384-find-max-min-value-based-time-criteria.html
I found this article above and was trying to use it to create/fix but I am still missing something. Any help would be appreciated.
<tbody>[TR]
[TD]row/column[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]--->[/TD]
[TD]BD ---->[/TD]
[TD]BI[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]Start[/TD]
[TD]End[/TD]
[TD]Target[/TD]
[TD][/TD]
[TD]TimeHour[/TD]
[TD]Target[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]3:00 AM[/TD]
[TD]6:00 AM[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]12:00 AM[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]1:00 AM[/TD]
[TD]6:00 AM[/TD]
[TD]4[/TD]
[TD][/TD]
[TD]1:00 AM[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]4:00 AM[/TD]
[TD]6:00 AM[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]2:00 AM[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]4:00 AM[/TD]
[TD]7:00 AM[/TD]
[TD]3[/TD]
[TD][/TD]
[TD]3:00 AM[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD]1:00 AM[/TD]
[TD]5:00 AM[/TD]
[TD]4[/TD]
[TD][/TD]
[TD]4:00 AM[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]17[/TD]
[TD]9:00 PM[/TD]
[TD]12:00 AM[/TD]
[TD]5[/TD]
[TD][/TD]
[TD]5:00 AM[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD] |[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]6:00 AM[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD] |[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]keeps going hour by hour[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]35[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]11:00 PM[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Goal: Make the Red cells calculate themselves. Max TARGET (BI) based On block of time shown in C to D .
Range BD12-BD35 (TimeHour)= Hours of the day (1 cell per hour)
BI12-BI35 (Target) are the Targets for those hours individually. Columns BE-BH have other data not relevant to this formula.
E12 -E17 is filled out manually. It is the highest (Target) number in the range of time shown. Example 3am, 4am, 5am hours are target 2, 2, 2, so give me E12=2
Row 16 - 1AM to 5AM, 1AM=4, 2AM = 3, 3AM=3, 4AM=2 so highest target is 4, give me 4.
{=MAX(IF($BD$12:$BD$40>=C12,IF($BD$12:$BD$40=D12,$BI$12:$BI$40)))} is giving me 0 in every cell. I did use CSE to enter it and it provided the { }. I typed them here for your reference.
Bad Result = 0 for everything. I originally had the table BD-BI on another worksheet called Sheet5 in this formula. I copied it over to the main page to see if it would change, but still zeros.
=MAX(IF((Sheet5!$A$4:$A$27<=D12)*(Sheet5!$A$4:$A$27>=C12),Sheet5!$F$4:$F$27,""))
https://www.mrexcel.com/forum/excel-questions/509384-find-max-min-value-based-time-criteria.html
I found this article above and was trying to use it to create/fix but I am still missing something. Any help would be appreciated.