+ Reply to Thread
Results 1 to 8 of 8

Formul to compute average and no of years up to last item in Col

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,722

    Formul to compute average and no of years up to last item in Col

    I would like to compute the average from B2 up to the last item in Col B where there is Data.

    I have used

    Please Login or Register  to view this content.

    I also want to compute the number of years in Col A (This Column contains dates) from A2 up to last item in Col A

    My formula for this is


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Formul to compute average and no of years up to last item in Col

    The values in column B are not all percentage, so I converted in % to column D those that are not % with this formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    For the average I use this formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    For the count of years and months:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Whenever possible, avoid using whole column references like A:A, which accounts for over a million rows.
    Maybe you can use A2:A1000, for example, depending on your data size.

    Please check file.

    Good luck!
    Attached Files Attached Files

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Formul to compute average and no of years up to last item in Col

    Please try
    Average Interest
    =AVERAGE(INDEX(--TEXT(B2:INDEX(B:B,MATCH(99,B:B)),"[>1]0.00\%;0.00%"),))

    No of Year
    =ROUND(COUNT(A:A)/12,2)

    or
    =YEARFRAC(A2,LOOKUP(9^9,A:A))
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,585

    Re: Formul to compute average and no of years up to last item in Col

    For number of years
    ARRAY formula.
    =SUM(1/(MMULT(0+(YEAR($A$2:$A$60)=TRANSPOSE(YEAR($A$2:$A$60))),0+(ROW($A$2:$A$60)>0))))

    To enter ARRAY formula
    Copy and paste the formula in cell
    Press F2
    Press Ctrl+Shift+Enter together
    Excel covers the formula with {}.
    Last edited by kvsrinivasamurthy; 11-24-2020 at 01:52 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,722

    Re: Formul to compute average and no of years up to last item in Col

    thanks for the help. Formulas work perfectly

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,585

    Re: Formul to compute average and no of years up to last item in Col

    Glad to hear that problem is solved. Pl mark the thread solved.

  7. #7
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Formul to compute average and no of years up to last item in Col

    You're welcome. Glad to help.
    Thanks for the feedback and the rep points added.

  8. #8
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,722

    Re: Formul to compute average and no of years up to last item in Col

    Thanks for the help, Kvsrinivasamurthy


    Please advise how your formula works

+ 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] How to compute Yes or No variance per line item?
    By Pat Abella in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 10-06-2020, 10:23 AM
  2. Replies: 6
    Last Post: 06-23-2019, 11:07 PM
  3. How to compute Years / Months / Days?
    By Locust in forum Excel General
    Replies: 4
    Last Post: 11-05-2010, 04:01 PM
  4. Trying to compute an average of certain cells
    By stmoist in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-27-2010, 03:24 PM
  5. [SOLVED] compute interest at 1.05% compounded daily on $77,000 for 5 years
    By larionova in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 07-22-2006, 12:25 AM
  6. How do i compute the average value of 100 iterations?
    By il_102 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-23-2005, 12:35 PM
  7. [SOLVED] Excel Formula - Compute Number of Years Worked
    By Penny in forum Excel General
    Replies: 2
    Last Post: 08-11-2005, 03:05 PM

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