Consulting

Results 1 to 5 of 5

Thread: Solved: Average of Values in Column E for each value in Column B - help

  1. #1
    VBAX Regular
    Joined
    Feb 2009
    Posts
    8
    Location

    Solved: Average of Values in Column E for each value in Column B - help

    I have a list of vendors (organized by vendor number) in Column B of my worksheet. Column E is a list of the # of days it took the vendor to get product to me.

    I need a macro that will search for like values in column B and then average the values in Column E of the corresponding Rows. I need it to report the result in Column F in each of those Rows.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,275
    Location
    Use this array formula

    =AVERAGE(IF($B$2:$B$17=B2,$E$2:$E$17))
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Feb 2009
    Posts
    8
    Location
    Thanks xld, I'll try that.

    How does the "$" function in that array?

  4. #4
    VBAX Regular
    Joined
    Feb 2009
    Posts
    8
    Location
    Actually, that doesn't work right.

    The result is the average of every cell value in Coumn E. I just want the averaged result of the Column E values that correspond with the like values in Column B.

  5. #5
    Moderator VBAX Guru Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    3,868
    Location
    Please use Control Shift Enter when you enter the formula. The results will then show A10256 has an average of 7.75 days, B10110 an average of 8.75 etc.
    Remember To Do the Following....
    Use tags when posting code to the thread,
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

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