PDA

View Full Version : MAX MIN AVERAGE for situation



afm1985
09-14-2013, 05:20 AM
Hello guys
I`m trying to make a situation like in attached excel workbook. I have 2 case:
A) IF colume E from sheet rap0>1 i have 3 situation:
min IF ((F2=F65000 from sheet prelucrare =A2 from sheet rap0)*( C2:C65000 from sheet prelucrare =B2 from sheet Rap0)*(D2:D65000 from sheet prelucrare =C2 from sheet Rap0)*(E2:E65000 from sheet prelucrare =D2 from sheet Rap0) then in Colume F2 from sheet Rap0 = minimum value which accomplish all this conditions from colume G2:G65000 sheet prelucrare
max IF ((F2=F65000 from sheet prelucrare =A2 from sheet rap0)*( C2:C65000 from sheet prelucrare =B2 from sheet Rap0)*(D2:D65000 from sheet prelucrare =C2 from sheet Rap0)*(E2:E65000 from sheet prelucrare =D2 from sheet Rap0) then in Colume G2 from sheet Rap0 = maximun value which accomplish all this conditions from colume G2:G65000 sheet prelucrare
For average is arithmetic mean of those who accomplish all conditions for min and max .
B) If Colume E from sheet rap0 =1 then in colume H (average) is equal only whit the value from sheet prelucrare.
And same story is for net income but the reference is colume H from sheet prelucrare!
I try to write writte one VBA code but i bog down and If is helping you is better. If you want to do some proofs i don`t mind.
This situation is for over 1500 employeers and i`m using Exell 2003. Excuse my English and if the explenations are not enough i will return.

snb
09-14-2013, 07:16 AM
crosspost situation: http://www.excelfox.com/forum/f2/min-max-average-vba-for-situation-1451/#post6822