+ Reply to Thread
Results 1 to 8 of 8

Sumproduct using Left and Right

  1. #1
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Sumproduct using Left and Right

    Hi all.

    I try this =SUMPRODUCT((LEFT('3'!$M$15:$AG$30)=$C$2)*(RIGHT('3'!$M$15:$AG$30)=$C$2)*('3'!$M$8:$AG$8=$C$1)*('3'!$L$15:$L$30=$B3))
    It work if Left or Right only? But need both Left and Right as I have WW, WL, LW, W and L in the cell.

    I have try SUMPRODUCT(--(Left('3'!$M$15:$AG$30)=$C$2),--(RIGHT('3'!$M$15:$AG$30)=$C$2),--('3'!$M$8:$AG$8=$C$1),--('3'!$L$15:$L$30=$B3))
    It come up VALUE#

    Any idea!

    If need sample file let me know?

    Regard
    Last edited by micope21; 07-16-2019 at 06:23 AM.
    To help you by my post? it would be nice to click on to say "Thank you".
    If you are happy with a solution to your problem?
    Click Thread Tools above your first post,
    select "Mark your thread as Solved".

  2. #2
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Sumproduct using Left and Right

    here sample file looking for Left and right in total sum
    Attached Files Attached Files

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,911

    Re: Sumproduct using Left and Right

    If a cell has WW in it, should it count as 1 or 2 for the W column?
    Rory

  4. #4
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Sumproduct using Left and Right

    Count 2 if WW and count 1 if just W?
    Same as LL count 2, count 1 if L?
    If WL or LW count 1 each.

  5. #5
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,911

    Re: Sumproduct using Left and Right

    Then you could use:

    =SUMPRODUCT((LEN($J$3:$T$18)-LEN(SUBSTITUTE($J$3:$T$18,$C$2,"")))*(RIGHT($J$3:$T$18)=$C$2)*($J$2:$T2=$C$1)*($I$3:$I$18=$B3))

  6. #6
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Sumproduct using Left and Right

    =SUMPRODUCT(ISNUMBER(SEARCH($C$2,$J$3:$T$18))*($J$2:$T$2=$C$1)*($I$3:$I$18=$B3))
    if there are no more than 2 in a cell

  7. #7
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,911

    Re: Sumproduct using Left and Right

    Typo in earlier formula. Should be:

    =SUMPRODUCT((LEN($J$3:$T$18)-LEN(SUBSTITUTE($J$3:$T$18,$C$2,"")))*($J$2:$T$2=$C$1)*($I$3:$I$18=$B3))

  8. #8
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Sumproduct using Left and Right

    Thank you rorya and tim210110.

    rorya, your first formula was not right till you post 2nd one? Now it correct formula in sample and my main file.
    tim210110, your was very close!

    Now it solved
    add rep!

+ 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] using left function in sumproduct
    By steeler11111 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-30-2016, 10:44 AM
  2. [SOLVED] using left function in sumproduct
    By steeler11111 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-30-2016, 10:22 AM
  3. [SOLVED] Sumproduct and Left
    By siqqboy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-11-2014, 01:39 PM
  4. SumProduct, Index & Left
    By julhs in forum Excel General
    Replies: 2
    Last Post: 01-28-2012, 02:08 PM
  5. Excel 2007 : LEFT With SUMPRODUCT
    By erik.kirby in forum Excel General
    Replies: 5
    Last Post: 02-10-2011, 03:08 PM
  6. SUMPRODUCT and LEFT.
    By klund in forum Excel General
    Replies: 8
    Last Post: 05-03-2009, 07:28 AM
  7. Left and Sumproduct
    By Alexball in forum Excel General
    Replies: 1
    Last Post: 08-09-2006, 07:04 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