+ Reply to Thread
Results 1 to 6 of 6

Sum(max(col1),max(col2),...) Question

  1. #1
    Registered User
    Join Date
    08-07-2004
    Posts
    2

    Sum(max(col1),max(col2),...) Question

    Hey Guys,

    I have a question. I am trying to find the max of each column and sum it up such as this: Sum(max(col1),max(col2),...) .

    Unfortunately, i have 200 columns and this operation will require a long time to construct and move around.

    Is there a better way to write this in one swoop?

    Thank you!

  2. #2
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Sum(max(col1),max(col2),...) Question

    You don't show your Office/Excel version. There are fairly simple ways to construct formulas as text strings in more recent versions. If you have TEXTJOIN, you could use something like

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

    to produce this sort of formula for C3:C102 through DZ3:DZ102. Then copy the cell containing this formula, and paste-special as values on top of it.

    If that's not close enough to one swoop or you have an older version of Excel which lacks TEXTJOIN, you may be better off using VBA user-defined functions which handle the iteration by column internally, e.g.,

    Please Login or Register  to view this content.
    Last edited by hrlngrv; 02-26-2021 at 06:48 PM. Reason: correction

  3. #3
    Registered User
    Join Date
    08-07-2004
    Posts
    2
    Thank you very much i will try this. I have office 2013 so I hippie this will work. Thanks again!
    Last edited by AliGW; 02-27-2021 at 06:01 AM. Reason: PLEASE don't quote unnecessarily!

  4. #4
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Sum(max(col1),max(col2),...) Question

    Excel 2013 lacks TEXTJOIN, so you'd need to use the VBA approach. You'd use the function in cell formulas like =SumMaxByCol(C3:DZ102).

  5. #5
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Sum(max(col1),max(col2),...) Question

    you might try something along lines of:

    =SUMPRODUCT(SUBTOTAL(4,OFFSET(C:C,0,COLUMN(C1:GT1)-COLUMN(C1))))
    Last edited by XLent; 02-27-2021 at 06:10 AM. Reason: superfluous element removed

  6. #6
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Sum(max(col1),max(col2),...) Question

    Should add a caveat whenever recommending using volatile functions which operate on thousands of cells much less potentially hundreds of millions of cells.

+ 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. Replies: 1
    Last Post: 12-09-2014, 11:41 AM
  2. Replies: 3
    Last Post: 11-01-2014, 10:45 PM
  3. [SOLVED] Compare Column 1 to Col 2, if data in Col1 = Col2, remove the row containing that data
    By Trevasaurus in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-04-2012, 05:28 PM
  4. Replies: 6
    Last Post: 08-22-2012, 07:53 AM
  5. SUMIF(range,cell,(col1*col2)
    By pinkshirt in forum Excel General
    Replies: 4
    Last Post: 07-07-2011, 11:36 AM
  6. [SOLVED] Enter A/C# on Sht1 Col1, Sht1 Col2,3,etc auto filled in from Sht2
    By LearningExcel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-13-2006, 11:55 PM
  7. Replies: 5
    Last Post: 06-02-2005, 01:05 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