+ Reply to Thread
Results 1 to 11 of 11

Lambda formula to find and calculate average of rows

  1. #1
    Registered User
    Join Date
    01-03-2022
    Location
    DK
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    11

    Lambda formula to find and calculate average of rows

    Hi

    I'm trying to modify the formula below, to calculate average % of the rows that match an input. So it should average the rows 6, 8, 10, 12 and 14, when the rows match my lookup values.

    Please Login or Register  to view this content.
    Right now, the formula does a sumproduct of two rows, adding them together if they matches my lookup value.


    Hopefully the attached file helps explain it.


    Thanks in advantage
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,084

    Re: Lambda formula to find and calculate average of rows

    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-03-2022
    Location
    DK
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    11

    Re: Lambda formula to find and calculate average of rows

    Thanks Fluff13. Your formula works for what I specified.

    Sometimes I have cells where reps are noted, but not %.
    Is it possible to account for this, so that:
    If I have reps in the lower cell and the one above is blank, it should count as 100%.
    If both are blank, it should not be counted in the average calculation.

    Thanks

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,084

    Re: Lambda formula to find and calculate average of rows

    You would be far better of putting the data into the sheet, rather than trying to bodge it.

  5. #5
    Registered User
    Join Date
    01-03-2022
    Location
    DK
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    11

    Re: Lambda formula to find and calculate average of rows

    I have updated the excel file with a description that hopefully makes sense

    Thanks
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,981

    Re: Lambda formula to find and calculate average of rows

    Administrative Note:

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so. Cross-posts are allowed but you must provide a link to your posts on other sites.

    Please see Forum Rule #7 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important: https://excelguru.ca/a-message-to-forum-cross-posters/

    (Note: this requirement is not optional. No help to be offered until you provide a link or, for members with fewer than 10 posts, a comment telling us where else you have posted this query.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    01-03-2022
    Location
    DK
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    11

    Re: Lambda formula to find and calculate average of rows

    Last edited by AliGW; 10-02-2023 at 09:01 AM. Reason: URL fixed.

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,084

    Re: Lambda formula to find and calculate average of rows

    As I said before, you are far better off putting that data into the cells.

  9. #9
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Lambda formula to find and calculate average of rows

    This formula returns the expected results without helpers:

    Please try in Y23 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    01-03-2022
    Location
    DK
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    11

    Re: Lambda formula to find and calculate average of rows

    I think I may have misunderstood you then Fluff13. I thought you meant my description was hard to understand without the excel file. Either way, thanks a lot for helping me out

    Thanks a lot HansDouwe. Once again you are of great help

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,084

    Re: Lambda formula to find and calculate average of rows

    Glad to help & thanks for the feedback.

+ 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] spill data over columns and rows with Byrow/lambda
    By Limor_OP in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 07-31-2023, 10:18 AM
  2. Spilling a BYCOL/LAMBDA function across rows
    By Emlyn Flint in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-23-2023, 09:39 AM
  3. [SOLVED] Need formula to calculate average state total fuel expense and price per gallon average
    By thematrix05 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-03-2023, 07:18 AM
  4. [SOLVED] Having problem with a formula to find average every 10 rows
    By Options78 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-10-2020, 10:59 AM
  5. Replies: 5
    Last Post: 09-11-2018, 10:29 AM
  6. NEED! Formula to calculate a conditional average of cells in multiple rows
    By PhotoFranco in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-09-2018, 09:44 AM
  7. Find and calculate average
    By Vbort44 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-02-2008, 11:10 AM

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