Find MIN/MAX Value with conditional formatting in given block of DATA - then repeat

Igorzjeh

New Member
Joined
Jul 25, 2022
Messages
1
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
I've been wraping my head around this one for couple of days, might be that I am just looking at this in a wrong way.

Here is my problem:
- i have data blocks that are divided by empty cells in columns G and H. Column G has to show MAX value in green and Column H needs to show LOWEST value in red - and then repeat this for each block of data
- Perhaps the helper column can be Column C - where you can see when the data blocks are separated by letter S or L + empty cells
- other thing to point out is that columns G and H have formula inside which deletes the data in those columns if there is an X in Column B for that row - hence the empty cells that divide the data

Here is a small sample of data that usually has 100k+ rows.

I hope you guys can help, tnx!

cjelovit ott.xlsx
ABCDEFGH
1timeIZBORNIKSIDEUnos BITNO1 TEST2 TEST1 % test2% test
22021-12-01T21:45:00+01:00XS0,2076360,000846-0,00149  
32021-12-01T22:00:00+01:00S0,2076360,001516-0,00044-341,74%-46797,08%
42021-12-01T22:15:00+01:00S0,2076360,001646-0,00046-355,04%-44778,64%
52021-12-01T22:30:00+01:00S0,2076360,0018360,000536342,40%38716,09%
62021-12-02T08:45:00+01:00S0,2076360,0017360,001066162,83%19472,51%
72021-12-02T09:00:00+01:00S0,2076360,0018260,000896203,76%23165,81%
82021-12-02T09:15:00+01:00S0,2076360,0015860,000766207,01%27095,78%
92021-12-02T09:30:00+01:00XL0,2127790,008221-0,00646  
102021-12-03T12:15:00+01:00L0,212779-0,00225-0,0029576,26%-7216,26%
112021-12-03T14:45:00+01:00L0,212779-0,0025-0,0036768,11%-5799,99%
122021-12-03T15:00:00+01:00L0,212779-0,00279-0,0036875,81%-5784,23%
132021-12-03T15:15:00+01:00L0,212779-0,00334-0,0048469,00%-4397,52%
142021-12-03T15:30:00+01:00L0,212779-0,00338-0,0050367,19%-4231,37%
152021-12-03T15:45:00+01:00L0,212779-0,00443-0,0063270,09%-3367,50%
162021-12-03T16:00:00+01:00XS0,2065080,001298-0,00082  
172021-12-03T16:15:00+01:00S0,2065080,000888-0,00046-192,01%-44669,05%
182021-12-06T20:15:00+01:00S0,2065080,0331380,031718104,48%651,08%
192021-12-06T21:30:00+01:00S0,2065080,0321580,030528105,34%676,46%
202021-12-06T21:45:00+01:00S0,2065080,0331380,030608108,27%674,69%
212021-12-06T22:00:00+01:00S0,2065080,0332380,032128103,45%642,77%
222021-12-06T22:15:00+01:00S0,2065080,0329980,031718104,04%651,08%
232021-12-06T22:30:00+01:00S0,2065080,0320380,030598104,71%674,91%
242021-12-06T22:45:00+01:00XL0,1760490,003251-0,00024  
252021-12-06T23:00:00+01:00L0,1760490,0036710,000971378,07%18131,01%
262021-12-09T14:45:00+01:00L0,1760490,0014210,000611232,57%28814,06%
272021-12-09T15:00:00+01:00L0,1760490,0018610,000941197,77%18709,05%
282021-12-09T15:15:00+01:00L0,1760490,001761-0,00031-569,87%-56970,66%
292021-12-09T15:30:00+01:00L0,1760490,000181-0,00155-11,68%-11365,21%
302021-12-09T15:45:00+01:00L0,176049-0,00117-0,0029539,64%-5969,75%
312021-12-09T16:00:00+01:00L0,176049-0,00154-0,0036242,53%-4864,55%
322021-12-09T16:15:00+01:00XS0,1716540,001164-0,00296  
332021-12-09T16:30:00+01:00S0,1716540,001344-0,00056-241,71%-30871,41%
342021-12-09T16:45:00+01:00S0,171654-0,00034-0,0021715,51%-7924,82%
352021-12-09T17:00:00+01:00S0,171654-0,00029-0,0015418,62%-11175,18%
362021-12-09T17:15:00+01:00S0,171654-0,00055-0,0024822,05%-6932,63%
372021-12-09T17:30:00+01:00S0,171654-0,00185-0,0032257,40%-5337,45%
382021-12-09T17:45:00+01:00S0,171654-0,00236-0,0040757,94%-4221,66%
392021-12-09T18:00:00+01:00S0,171654-0,00356-0,0071549,76%-2402,09%
402021-12-09T18:15:00+01:00S0,171654-0,00461-0,0112540,96%-1526,35%
412021-12-09T18:30:00+01:00S0,171654-0,00332-0,0053961,57%-3187,02%
cjelovit ott
Cell Formulas
RangeFormula
G2:G41G2=IF(B2=ISBLANK(FALSE),E2/F2,"")
H2:H41H2=IF(B2=ISBLANK(FALSE),D2/F2,"")
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi and welcome to MrExcel board!

Note:

Change in formulas 42 to the last cell with data (+1) on your sheet.
For the maximum format:
Excel Formula:
=G2=MAX(OFFSET(G$1,LARGE(IF(G$2:G2="",ROW(G$2:G2)),1),0,SMALL(IF(G3:G$42="",ROW(G3:G$42)),1)-LARGE(IF(G$2:G2="",ROW(G$2:G2)),1)))
Applies to:
=$G$2:$G$42

For the minimum format:
Excel Formula:
=H2=MIN(OFFSET(H$1,LARGE(IF(H$2:H2="",ROW(H$2:H2)),1),0,SMALL(IF(H3:H$42="",ROW(H3:H$42)),1)-LARGE(IF(H$2:H2="",ROW(H$2:H2)),1)))
Applies to:
=$H$2:$H$42


The formulas are array formulas, you may have problems with the performance of your sheet.
If the response is very slow, then you should find another formula or maybe a VBA solution.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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