Applying a rule to the range within a function

alexvistas

New Member
Joined
Mar 2, 2010
Messages
23
Hello, I hope someone can help with a formula that can apply a dynamic range rule to a function argument?

I am using the min and max functions applied to sets of ranges of data. The ranges are all different lengths:
Example:
Cols A:D have number values in them.
Col E classifies the numbers as either "Green" or "Red"
Col F has the min function
Col G has the max function

Each set of data is broken down into chunks of green & red.
eg
A2: D4 Green
A5: D5 Red
A6:D10 Green and so on
Each separate colour chunk has a min and max value
eg Row 2 Col F =min(a2:d4)
Row 5 Col f =min((a5:d5)
Row 6 Col f =min(a6:d10)
At present I am having to go into each min and max formula and adjust the range depending on the amount of cells.
Question
Is it possible to add a rule to the min() function to dynamically apply a range rule that is saying and taking into account col E (Greens & Reds)?

Thanking you in advance. Hope the above is not too confusing.
I suspect you could use an indirect function somehow within the min function???
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
You can do if you have some helper columns:
Excel Workbook
ABCDEFGHI
113325399Green1Green112115
271356568Green1Green1  
39811594115Green1Green1  
4112961252Green1Green1  
534918650Red2Red23491
693397431Green3Green331116
7678491105Green3Green3  
81091087075Green3Green3  
9901164279Green3Green3  
1031694083Green3Green3  
1179315612Red4Red412118
128511679118Red4Red4  
1329409936Red4Red4  
1443743591Green5Green53591
15116769977Red6Red614118
16281495118Red6Red6  
1722892016Red6Red6  
181031129185Green7Green720112
191005610620Green7Green7  
Sheet
 
Upvote 0

Forum statistics

Threads
1,224,563
Messages
6,179,527
Members
452,923
Latest member
JackiG

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