+ Reply to Thread
Results 1 to 5 of 5

SUMSQ with multiple values

  1. #1
    Registered User
    Join Date
    02-11-2015
    Location
    Santa Rosa, CA
    MS-Off Ver
    2019
    Posts
    46

    SUMSQ with multiple values

    Yesterday, we found that =SUMSQ(B1:B20-$C$1) works well; it subtracts the constant from each value in B1:B20, squares each difference, and reports the total. I now need to subtract the constant from values that are not grouped together in an array. I tried =SUMSQ(VLOOKUP("yes",A1:B20,2)-$C$1) but it didn't work. Any suggestions?

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,173

    Re: SUMSQ with multiple values

    Try

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


    You may need to enter with "Ctrl+Shift+Enter"
    Last edited by JohnTopley; 08-15-2024 at 04:11 PM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,943

    Re: SUMSQ with multiple values

    Without data, I don't know what you expect. But you'd need a fourth parameter in the VLOOKUP, at least.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    02-11-2015
    Location
    Santa Rosa, CA
    MS-Off Ver
    2019
    Posts
    46

    Re: SUMSQ with multiple values

    Hello John,

    Thank you for your reply. Sorry I was unclear before.

    Cells A1:A10 contain the labels "yes" and "no" in random order. Cells B1:B10 contain values. Cell C1 contains a constant.
    I need a single-cell formula, not a third column or an array, that gives me the sum of the squares of the "yes" items after the constant has been subtracted.
    If the "yes" values were all in cells A1:A5, I could use =SUMSQ(B1:B5-$C$1), but my "yes" values are mixed in with the "no" values.

    I don't think VLOOKUP, with either a TRUE or a FALSE option, will work. Other functions I have tried include COUNTIF and SUMIF. Any ideas?

    Thanks,
    Jim

  5. #5
    Registered User
    Join Date
    02-11-2015
    Location
    Santa Rosa, CA
    MS-Off Ver
    2019
    Posts
    46

    Re: SUMSQ with multiple values

    Thanks John, =SUMSQ(IF(A1:A20="yes",B1:B20-$C$1,0)) works! Ctrl+Shift+Enter is not needed.

+ 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: 3
    Last Post: 02-06-2018, 07:46 AM
  2. [SOLVED] SumSq Function, Which Type does Excel estimate?
    By Bob1980 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-10-2014, 01:56 PM
  3. [SOLVED] SUMSQ for summing the inverse of a series of squared numbers
    By Excelmon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-03-2014, 06:59 PM
  4. Replies: 4
    Last Post: 05-12-2014, 07:10 PM
  5. Replies: 5
    Last Post: 08-04-2013, 09:49 AM
  6. Sum values from multiple cells - multiple lookup values in single cell
    By taxdept in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2012, 04:12 PM
  7. Replies: 5
    Last Post: 04-21-2011, 05:22 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