+ Reply to Thread
Results 1 to 8 of 8

How to match and sum a range where last two digits end with

  1. #1
    Registered User
    Join Date
    12-02-2011
    Location
    Maryland
    MS-Off Ver
    Excel 365
    Posts
    42

    How to match and sum a range where last two digits end with

    Hello
    Im attaching a simplified example of what Im trying to achieve.
    In the example spreadsheet, theres a range (B5:B10), with corresponding $ values in coiumn E. I want to know what the total $ sum is for each value in B5:B10 (Based on their last two seg values ending in 7x). What would be the best way to achieve this?
    Attached Files Attached Files

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,391

    Re: How to match and sum a range where last two digits end with

    In D14 copied down:

    =SUMPRODUCT((--RIGHT($B$5:$B$10,2)=B14)*$E$5:$E$10)
    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
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,133

    Re: How to match and sum a range where last two digits end with

    =SUMPRODUCT((RIGHT($B$5:$B$10,2)+0=B14)*$E$5:$E$10)

    copied down.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Registered User
    Join Date
    12-02-2011
    Location
    Maryland
    MS-Off Ver
    Excel 365
    Posts
    42

    Re: How to match and sum a range where last two digits end with

    Thank you both so much!

  5. #5
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,391

    Re: How to match and sum a range where last two digits end with

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  6. #6
    Registered User
    Join Date
    12-02-2011
    Location
    Maryland
    MS-Off Ver
    Excel 365
    Posts
    42

    Re: How to match and sum a range where last two digits end with

    Thank you I will def do so. Im trying to figure out why Im getting a #VALUE!
    Ok, I was extending my range down the column to blank cells, which was giving me the error. Fixed now. Thank you
    Last edited by Quisp; 03-11-2022 at 01:49 PM.

  7. #7
    Registered User
    Join Date
    12-02-2011
    Location
    Maryland
    MS-Off Ver
    Excel 365
    Posts
    42

    Re: How to match and sum a range where last two digits end with

    Actually, since the range in the example will likely expand(rows added with data), is there a way to adjust the formula so that I dont have to revise the formula for new row additions to (B5:B10)(E5:E10)?Also, how would the formula be adjusted to include a blank cell, without giving me #VALUE?

  8. #8
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,391

    Re: How to match and sum a range where last two digits end with

    Try this:

    =SUMPRODUCT((--RIGHT($B$5:$B$1000,2)=B14)*($B$5:$B$1000<>"")*$E$5:$E$1000)

+ 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] Index and Match BUT matching on first 5 digits of zip code ?
    By Ron Purpura in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-29-2021, 03:09 PM
  2. Replies: 3
    Last Post: 02-23-2021, 02:34 PM
  3. Match last 4 digits from cell with 4 digits in table
    By kc1ok in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-15-2017, 11:46 AM
  4. If first 4 digits match, then copy category number
    By hmm321 in forum Excel General
    Replies: 4
    Last Post: 10-26-2015, 11:46 AM
  5. [SOLVED] Match identical certain digits in 1column with another column
    By ricklou in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-06-2012, 08:23 AM
  6. what formula to use to match frequent 4 digits
    By ekbana in forum Excel General
    Replies: 1
    Last Post: 01-20-2009, 02:00 PM
  7. [SOLVED] match 3 hold digits
    By stewart08 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 04-13-2008, 03:30 PM

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