Max versus Min values across multiple entries

leebauman

Board Regular
Joined
Jul 1, 2004
Messages
194
Office Version
  1. 365
Platform
  1. Windows
Hello, I have a sheet with transaction history on hundreds of items. I output indicating the % variance of each item's Max value versus it's Min value. Thank you.

Data sample:
Book7
ABC
1ItemTransaction IDPrice
2AppleA1$1.00
3AppleA2$1.50
4AppleA3$1.25
5BananaA4$0.50
6BananaA5$0.50
7PearA6$0.75
8OrangeA7$1.00
9OrangeA8$2.00
10OrangeA9$2.50
11OrangeA10$0.50
12OrangeA11$8.00
Sheet1


Desired output:
Book7
AB
14ItemMax versus Min % Variance
15Apple50%
16Banana0%
17Pear0%
18Orange700%
Sheet1
Cell Formulas
RangeFormula
B15B15=(1.5-1)/1
B18B18=(8-1)/1
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
How about:

Book1
ABC
1ItemTransaction IDPrice
2AppleA11
3AppleA21.5
4AppleA31.25
5BananaA40.5
6BananaA50.5
7PearA60.75
8OrangeA71
9OrangeA82
10OrangeA92.5
11OrangeA100.5
12OrangeA118
13
14ItemMax versus Min % Variance
15Apple50%
16Banana0%
17Pear0%
18Orange1500%
Sheet7
Cell Formulas
RangeFormula
A15:B18A15=UNIQUE(CHOOSE({1,2},A2:A12,(MAXIFS(C2:C12,A2:A12,A2:A12)-MINIFS(C2:C12,A2:A12,A2:A12))/MINIFS(C2:C12,A2:A12,A2:A12)))
Dynamic array formulas.
 
Upvote 0
Solution
Yes, that's perfect (realizing I made a mistake in my calculation on the orange item). However, I get strange results. I must be doing something wrong?

Book9
ABC
1ItemTransaction IDPrice
2AppleA11
3AppleA21.5
4AppleA31.25
5BananaA40.5
6BananaA50.5
7PearA60.75
8OrangeA71
9OrangeA82
10OrangeA92.5
11OrangeA100.5
12OrangeA118
13
14ItemMax v Min variance %
15Apple0.5
16Banana0
17Pear0
18Orange15
Sheet1
Cell Formulas
RangeFormula
A15:B18A15=UNIQUE(CHOOSE({1,2},A2:A12,(MAXIFS(C2:C12,A2:A12,A2:A12)-MINIFS(C2:C12,A2:A12,A2:A12))/MINIFS(C2:C12,A2:A12,A2:A12)))
Dynamic array formulas.
 
Upvote 0
That looks correct. You just need to format the B15:B18 cells as Percentage.
 
Upvote 0
God...sorry, doing too much at once. I get it and it works great. Much appreciated!
 
Upvote 0

Forum statistics

Threads
1,214,870
Messages
6,122,021
Members
449,060
Latest member
LinusJE

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