Results 1 to 2 of 2

Thread: Min, Max, Average Vba for Situation

  1. #1
    Junior Member
    Join Date
    Sep 2013
    Posts
    1
    Rep Power
    0

    Min, Max, Average Vba for Situation

    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.
    Attached Files Attached Files

  2. #2
    Senior Member
    Join Date
    Jun 2012
    Posts
    337
    Rep Power
    12
    crosspost situation MAX MIN AVERAGE for situation

Similar Threads

  1. Replies: 2
    Last Post: 07-05-2013, 02:17 PM
  2. Sum Ifs Formula needed with Max Date range
    By trankim in forum Excel Help
    Replies: 2
    Last Post: 09-19-2012, 09:50 AM
  3. Find Value Based On MAX Value
    By Beaker Rex in forum Excel Help
    Replies: 3
    Last Post: 09-13-2011, 06:22 AM
  4. Average Of The X Largest Numbers
    By Excel Fox in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 04-16-2011, 04:15 PM
  5. Replies: 4
    Last Post: 04-07-2011, 07:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •