+ Reply to Thread
Results 1 to 6 of 6

Aggregate of Multiple columns IF a condition is met

  1. #1
    Registered User
    Join Date
    03-01-2022
    Location
    Raleigh NC
    MS-Off Ver
    365
    Posts
    19

    Aggregate of Multiple columns IF a condition is met

    I have a formula that gets the overall median of four ranges:
    Aggregate(12,6,A2:A1000,B2:B1000,C2:C1000,D2:D1000).
    I'm trying to modify this formula to get the aggregate median for ONLY the values below zero.
    Note that some of the cells will be empty.
    Any suggestions?

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

    Re: Aggregate of Multiple columns IF a condition is met

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

  3. #3
    Registered User
    Join Date
    03-01-2022
    Location
    Raleigh NC
    MS-Off Ver
    365
    Posts
    19

    Re: Aggregate of Multiple columns IF a condition is met

    I simplified things too much in my original post. My columns are not adjacent to each other. A better example would be:
    Aggregate(12,6,a2:A1000,G2:G1000, R2:R1000,Z2:Z1000)
    There is other data between these columns, and some cells are blank.

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

    Re: Aggregate of Multiple columns IF a condition is met

    Two other options:

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

  5. #5
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,439

    Re: Aggregate of Multiple columns IF a condition is met

    other option , pls try

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

  6. #6
    Registered User
    Join Date
    03-01-2022
    Location
    Raleigh NC
    MS-Off Ver
    365
    Posts
    19

    Re: Aggregate of Multiple columns IF a condition is met

    Thanks.
    I used:
    =LET(t,HSTACK(A2:A1000,G2:G1000,R2:R1000,Z2:Z1000),MEDIAN(IF(t<0,t)))
    and it appears to work. I'll have to figure out how it works.

    I've been using Excel (and VBA) for about 35 years and know a lot, but there are still things I don't know!

+ 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] Aggregate a list based on condition
    By purlo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-11-2022, 09:06 AM
  2. split two columns to multiple columns based on condition
    By Alaa-A in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-15-2021, 11:20 PM
  3. [SOLVED] Index aggregate multiple criteria and columns to search
    By aswethink in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 03-28-2021, 04:44 AM
  4. Index aggregate with multiple criterias for different columns
    By Nicolantonio in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-31-2020, 02:10 PM
  5. [SOLVED] Index-Aggregate search on multiple columns
    By Berna11 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-01-2020, 01:57 PM
  6. [SOLVED] Aggregate Rows of Data if Condition is met (if 2 Columns contains dup values)
    By popcorn7 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 09-28-2018, 10:27 AM
  7. Aggregate function with condition
    By buttonman in forum Excel General
    Replies: 9
    Last Post: 06-30-2017, 02:23 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