+ Reply to Thread
Results 1 to 4 of 4

Remove last character from string and sum product

  1. #1
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Remove last character from string and sum product

    Hi all,

    I'm confused now. Assume you have huge range of many different products on the left, dates on top and values within the range. Products look like: GREEN1, GREEN 2, GREEN3 etc. & YELLOW1, YELLOW2 etc.

    Question: how do I make formula sum the values of all GREEN (regardless what number is at the end) of the day?

    See dummy if I'm not clear enough...

    Thanks a ton guys for your priceless ideas!
    Attached Files Attached Files
    Last edited by ABSTRAKTUS; 04-03-2012 at 10:46 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Remove last character from string and sum product

    In N13:

    =SUMPRODUCT(($M13=LEFT($B$12:$B$20,LEN($B$12:$B$20)-1))*1,C$12:C$20) and copy across.
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  3. #3
    Registered User
    Join Date
    03-26-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Remove last character from string and sum product

    A wildcard operator should suffice:

    =sumif($B12:$B$20,"*"&$M13&"*",C$12:C$20)
    Last edited by Down Under; 04-03-2012 at 10:38 AM.

  4. #4
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Re: Remove last character from string and sum product

    Spot on! That does a trick! Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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