+ Reply to Thread
Results 1 to 6 of 6

TRIMMEAN If

  1. #1
    Forum Contributor
    Join Date
    10-15-2012
    Location
    Dallas, TX
    MS-Off Ver
    2019
    Posts
    167

    TRIMMEAN If

    I want to apply TRIMMEAN to a range, but only if cells in another range is positive. This formula will reside in RESULTS C11.

    I've seen several examples like this

    Please Login or Register  to view this content.
    But I cannot get it to work with what I have. Here's a TRIMMEAN formula that works by itself in RESULTS C11...

    Please Login or Register  to view this content.
    I want to condition the following...

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by cableghost; 06-10-2021 at 10:01 PM.

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: TRIMMEAN If

    TRIMMEAN(RANGE,%), if range is an array (created from a condition formula), it required confirmation by Ctrl-shift-enter (not only Enter)

    =TRIMMEAN(IF(Table1[G/L $]>0,Table1[G/L],""),0.05)
    Attached Files Attached Files
    Quang PT

  3. #3
    Forum Contributor
    Join Date
    10-15-2012
    Location
    Dallas, TX
    MS-Off Ver
    2019
    Posts
    167

    Re: TRIMMEAN If

    Thanks @bebe. I'm not sure I need to enter this as an array. As a test... I ran a trimmean of positive numbers in that col - 5%, I get .13.

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: TRIMMEAN If

    What TRIMMEAN were you using to get .13? With Enter or Ctrl-shift-enter?
    =TRIMMEAN(IF(Table1[G/L $]>0,Table1[G/L],""),0.05)
    I got .245943, with Ctrl-shift-enter

  5. #5
    Forum Contributor
    Join Date
    10-15-2012
    Location
    Dallas, TX
    MS-Off Ver
    2019
    Posts
    167

    Re: TRIMMEAN If

    Dismiss that calculation. As a test instead, I manually extracted the positive numbers into a new sheet and ran =TRIMMEAN(A1:A165,0.05). I get .247446. This number and yours should be the same now, shouldn't they?

    Please educate me on this... I'm not understanding the array aspect. Why must this be entered as an array... the data source(s) are ranges?

    Edit: See if maybe I understand now... Although the original data was in a range, it became an array when pulling out only the positive numbers?
    Last edited by cableghost; 06-10-2021 at 10:47 AM.

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: TRIMMEAN If

    I tried to remove 0 and blank cells, extracted to other sheet "test", then tested both formula, I got same result. See attachment

    Quote Originally Posted by cableghost View Post
    As a test instead, I manually extracted the positive numbers into a new sheet and ran =TRIMMEAN(A1:A165,0.05). I get .247446. This number and yours should be the same now, shouldn't they?
    I guess that you did not delete all rows with blank? Excel treats blank cell as zero value.

    a range: you can see it is visible in sheet: i.e, A1:A165
    but an array: it is created from a formula, that you cannot see it: =ID(A1:A165>0,A1:A165,"") is visible. It require to go through each cell, do math: A1>0 then A1, A2=0 then blank,...,until A165
    Some funtion does not accept array, i.e, COUNTIF(RANGE,..), but not COUNTIF(IF(...),...), similar to SUMIF...
    Some work with array, but require Ctrl-Shift-Enter, i.e, TRIMMEAN...
    Attached Files Attached Files

+ 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. Alternative to TRIMMEAN
    By DaleJ92 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-05-2021, 02:55 PM
  2. Trimmean Summary
    By oneyejack77 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-08-2020, 09:53 PM
  3. [SOLVED] Trimmean help to ignore 0
    By jonoman1234 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-19-2017, 03:08 AM
  4. Trimmean to ignore #div/0!
    By Nevada511 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-14-2017, 04:33 AM
  5. Alternative TRIMMEAN
    By Brennen81 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-06-2015, 09:29 AM
  6. [SOLVED] TRIMMEAN & OFFSET together
    By JTM1200 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-11-2012, 05:23 PM
  7. TRIMMEAN with different percentiles?
    By [email protected] in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-14-2006, 01:15 PM

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