+ Reply to Thread
Results 1 to 5 of 5

Add cell values for any matching data in range

  1. #1
    Registered User
    Join Date
    03-30-2022
    Location
    Vancouver, Canada
    MS-Off Ver
    2016
    Posts
    2

    Add cell values for any matching data in range

    Hello everyone,
    I am posting here after looking for multiple options/ways this could be done but couldn't find an answer.

    So I am posting it with an example.
    I want the data within the columns to be compared first, for eg. from if data is compared within the column, A2 to A5 are duplicates, B2 to B5 are duplicates and so forth.
    For this duplicate range, I want to be able to add the COLUMN5 data and get a result in any cell in that range in F/Results column.
    So it will only add cells from within column E if data in other columns (within columns matches). I hope it makes sense?
    I have highlighted the result.

    Even if there is another way to do it without formulas, answers are most welcome.
    Please note that this is just an example, in the actual file data goes as far as row 2799
    Thank you
    Captured.JPG

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,911

    Re: Add cell values for any matching data in range

    Try this in F2:

    =IF(AND(A2<>A3,B2<>B3),SUM($E$2:E2)-SUM($F$1:F1),"")

  3. #3
    Registered User
    Join Date
    03-30-2022
    Location
    Vancouver, Canada
    MS-Off Ver
    2016
    Posts
    2

    Re: Add cell values for any matching data in range

    Quote Originally Posted by Phuocam View Post
    Try this in F2:

    =IF(AND(A2<>A3,B2<>B3),SUM($E$2:E2)-SUM($F$1:F1),"")
    Thank you for a reply.
    Its returning blank cell when pasted in F2.

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,911

    Re: Add cell values for any matching data in range

    Hi;

    Can you upload the file and the expected results?

  5. #5
    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
    28,206

    Re: Add cell values for any matching data in range

    With

    =IF(AND(A2<>A3,B2<>B3),SUM($E$2:E2)-SUM($F$1:F1),"")

    F2 will be blank but F5 will have 200 and F13 has 380 (as per your post)

    BUT need to add tests for columns C & D
    Last edited by JohnTopley; 03-31-2022 at 06:49 AM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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] Counting number of values in a range matching with another range
    By mfhaq77 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-04-2021, 03:48 PM
  2. Replies: 5
    Last Post: 05-17-2019, 07:41 AM
  3. Replies: 1
    Last Post: 03-27-2019, 11:57 PM
  4. Need help with matching cell values and adding another cell of data.
    By mrip in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2013, 04:31 PM
  5. Replies: 1
    Last Post: 07-24-2013, 05:18 AM
  6. Indexing and matching data from date range and matching
    By Rickomicko in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-19-2013, 11:46 AM
  7. [SOLVED] Return cell values for non-matching & matching criteria
    By jenz_skallemose in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-13-2012, 11:52 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