+ Reply to Thread
Results 1 to 4 of 4

Sort column with if statement, then return sum of values in corresponding row if true

  1. #1
    Registered User
    Join Date
    03-27-2022
    Location
    Minnesota
    MS-Off Ver
    Sheets
    Posts
    2

    Sort column with if statement, then return sum of values in corresponding row if true

    Hi, I am new here and very novice in excel.

    I have 2 columns of data, one containing names and the other containing values.

    I would like to make a function that searches the first column, checking for certain names, and if the names are a match I would like it to sum the values in the corresponding column in the same row of all those names.

    I don't know what functions I am supposed to use, I tried googling and I think I need if function, then either a sort, index, or filter? or something of the sort.

    Thank you!

  2. #2
    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
    79,369

    Re: Sort column with if statement, then return sum of values in corresponding row if true

    Moved to the Other Platforms section, as you have Google Sheets.
    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.

  3. #3
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Sort column with if statement, then return sum of values in corresponding row if true

    if your data has a header row in cells A1:B1, with your data starting in A2:B2 and below:

    Method 1:
    1. copy the header cells from A1:B1 to C1:D1

    2. put this formula into cell C2:
    Please Login or Register  to view this content.
    OR
    Please Login or Register  to view this content.
    Method 2:

    put this formula into cell C1:
    Please Login or Register  to view this content.
    OR
    Please Login or Register  to view this content.
    Last edited by janmorris; 03-27-2022 at 05:58 AM.
    As a gesture off appreciation, you can click * Add Reputation at the foot of any of the posts of members who helped you reach a solution.

    And finally, was your problem solved? if so, please click Thread Tools above the first post of your enquiry, then select [Solved]

  4. #4
    Registered User
    Join Date
    03-27-2022
    Location
    Minnesota
    MS-Off Ver
    Sheets
    Posts
    2

    Re: Sort column with if statement, then return sum of values in corresponding row if true

    thank you so much! :D

+ 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. Return column headers for all true values in Google Sheets
    By tim34 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 3
    Last Post: 03-30-2021, 02:57 AM
  2. Set day IF statement is true as return value
    By roman_crook in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-04-2021, 11:21 AM
  3. [SOLVED] Return values from other rows for column which shows TRUE value in row.
    By dbl_dbl in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-24-2019, 10:02 AM
  4. Replies: 3
    Last Post: 08-16-2018, 06:07 AM
  5. [SOLVED] If Statement Only to Return True Results
    By Hannah122392 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-10-2016, 02:25 PM
  6. Return distinct values from column where if statement is true
    By eoindub in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-03-2014, 08:54 AM
  7. Function to search Column for a range of values and return TRUE or FALSE
    By BamBamMoneyBags in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-05-2013, 05:59 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