+ Reply to Thread
Results 1 to 6 of 6

Sum each column and then perform average, place amounts on designated row for column

  1. #1
    Registered User
    Join Date
    04-16-2020
    Location
    United States
    MS-Off Ver
    2016
    Posts
    16

    Sum each column and then perform average, place amounts on designated row for column

    Hello,

    I'm working on some columns that alternate between salary and quantity. I have thousands of columns. I need to sum each salary column and place each sum at row 51. Then I need to get the average for each salary column and place that on line 52. The number of salaries is already on row 50 for each, so the average would have to be taken by taking the sum and dividing by the number of salaries already on row 50. The difficulty with this is, first getting the sums for each salary column and placing them on the corresponding columns on row 51. Then having the average calculation be placed on row 52 for each salary column.

    Can someone help?

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: Sum each column and then perform average, place amounts on designated row for column

    Hi there. Please can you post a copy of your worksheet so we can take a look. It's much easier to propose a solution in your (desensitized) copy.

    See the yellow band at the top of the page for details.

    Tim
    Never stop learning!
    <--- please consider *-ing !

  3. #3
    Registered User
    Join Date
    04-16-2020
    Location
    United States
    MS-Off Ver
    2016
    Posts
    16

    Re: Sum each column and then perform average, place amounts on designated row for column

    Hi Harrisonland,
    I attached a sample. Thanks for responding. Hope you can help.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: Sum each column and then perform average, place amounts on designated row for column

    Ok... looking at your sample, the sum of salaries (assuming the "Quantity" may not always to be 1) for column B is
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and the column average will be:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Having that in mind, you could run a VBA routine like this to complete all columns in one fell swoop:
    Please Login or Register  to view this content.
    Is that what you had in mind?

    Tim
    Attached Files Attached Files
    Last edited by harrisonland; 04-16-2020 at 09:16 PM.

  5. #5
    Registered User
    Join Date
    04-16-2020
    Location
    United States
    MS-Off Ver
    2016
    Posts
    16

    Re: Sum each column and then perform average, place amounts on designated row for column

    Wow! That works great! Thank you

  6. #6
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: Sum each column and then perform average, place amounts on designated row for column

    If you consider the issue sorted, don't forget to mark the thread [SOLVED] using the thread tools at the top of the page.

    You can also show your appreciation for those who have helped by clicking the * at the left of each post to give feedback.

    Tim

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Formula to add column amounts unless cell is blank then add number in a different column
    By utahwilkinsons in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-31-2019, 10:48 AM
  2. [SOLVED] If Column X contains Y, then move Y to designated Column.
    By JakeSmith466 in forum Excel General
    Replies: 6
    Last Post: 02-09-2017, 12:47 PM
  3. Replies: 8
    Last Post: 04-19-2013, 12:06 PM
  4. [SOLVED] Average amounts associated with name in different column
    By chouston in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-13-2013, 07:24 PM
  5. [SOLVED] Cut info from a column and paste it under a designated column
    By VKS in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-03-2013, 12:46 PM
  6. Replies: 3
    Last Post: 11-08-2012, 09:29 PM
  7. [SOLVED] Match dates in column B with column A across worksheets and sum any amounts in column G
    By daddywine in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-04-2012, 01:07 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1