+ Reply to Thread
Results 1 to 13 of 13

Function Sumproduct - Search - Left

  1. #1
    Registered User
    Join Date
    08-14-2017
    Location
    Portugal
    MS-Off Ver
    2010
    Posts
    5

    Function Sumproduct - Search - Left

    Good morning everyone.

    I've been trying to find a solution to a problem through the sumproduct function for several days, I've tried several approaches and I can't solve it.

    In each line I have to add the amount of "A", "B" or "C" and in each cell of that line I have for example: "3A + 1B" and in another cell "33B + 1C". I tried using sumproduct, search to find the letter and then LEFT to remove the 2 characters only. Is there any way to solve this without using VBA?

    Thank you in advance for your help.
    Attached Files Attached Files

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

    Re: Function Sumproduct - Search - Left

    What Excel version do you have?? (Windows 10 is not an Excel version!!).
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    08-14-2017
    Location
    Portugal
    MS-Off Ver
    2010
    Posts
    5

    Re: Function Sumproduct - Search - Left

    Excel 2010. I will review where I put thatinformation.

  4. #4
    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,004

    Re: Function Sumproduct - Search - Left

    Thanks... It's in your User Control panel...

  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,175

    Re: Function Sumproduct - Search - Left

    Use EVALUATE function

    See https://www.myonlinetraininghub.com/...luate-function

    in A4 and copy across

    =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,"A","*"&$W$2),"B","*"&$X$2),"C","*"&$Y$2)

    in A5 and copy across

    =IFERROR(Result,"")

    RESULT is named range referes to: =EVALUATE(A$4)

    NOTE: file is XLSM
    Attached Files Attached Files

  6. #6
    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,004

    Re: Function Sumproduct - Search - Left

    Mmm. That's not they way I interpreted this. If this is INCORRECT, remove doubts by TELLING us your expected answers...

  7. #7
    Registered User
    Join Date
    08-14-2017
    Location
    Portugal
    MS-Off Ver
    2010
    Posts
    5

    Re: Function Sumproduct - Search - Left

    Thanks for the answer.
    I think I didn't explain myself well, the idea would be to add the amount of "A", "B" and "C", and for that reason I was using the sumproduct function, together with search and left.

    If you have 1A + 1B; 1C + 1A; 33B + 1C; ... at the end you have 2 "A", 34 "B" and 2 "C"
    if on the bottom line you have 31A + 1B; 1C + 1A; 33B + 1C; ... at the end you have 32 "A", 34 "B" and 2 "C"

    I can't get the sum in the sumproduct function to add the values placed next to the letters.

    Example attachment.
    Attached Files Attached Files

  8. #8
    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,004

    Re: Function Sumproduct - Search - Left

    OK. This is simple... one short formula... with O365. In anything >= Excel 2013, it can also be done but with a little effort.... However, in Excel 2010, I am stuck!! I can do the A's easily enough, but cannot get the Bs and Cs...

  9. #9
    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,175

    Re: Function Sumproduct - Search - Left

    Please Login or Register  to view this content.
    in W2

    =count_ABC($A2:$V2,W$1)

    copy across and down
    Attached Files Attached Files

  10. #10
    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,004

    Re: Function Sumproduct - Search - Left

    Woo Hoo! I never picked up VBA... Too late, now...

  11. #11
    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,175

    Re: Function Sumproduct - Search - Left

    It's never too late to learn "new tricks" !!!!!

    I consider myself no more than competent in VBA : I (sometimes) use it because the formulae you (and many others use) hurt my brain!!

    But this is an example where VBA can score vs a (potentially) complex formula.

  12. #12
    Registered User
    Join Date
    08-14-2017
    Location
    Portugal
    MS-Off Ver
    2010
    Posts
    5

    Re: Function Sumproduct - Search - Left

    Good afternoon, thanks for the help, because I was not seeing any formula to solve this.

    I will try to keep this solution in vBA, because sometimes we have problems with VBA code.

    Thanks again for the help.

  13. #13
    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,175

    Re: Function Sumproduct - Search - Left

    Glad to help.

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

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon 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 those who helped.

+ 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. Sumproduct with Left Function
    By bees84 in forum Excel General
    Replies: 12
    Last Post: 07-31-2019, 09:33 AM
  2. [SOLVED] How to Incorporate LEFT, SEARCH Function with VLOOKUP to Return Surnames Only
    By SmittyCL in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-04-2019, 09:13 PM
  3. [SOLVED] using left function in sumproduct
    By steeler11111 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-30-2016, 10:44 AM
  4. [SOLVED] using left function in sumproduct
    By steeler11111 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-30-2016, 10:22 AM
  5. SumProduct with using Left() Function
    By rmb623 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-16-2013, 05:53 AM
  6. Search and Left Function
    By VegasL in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-15-2008, 03:09 PM
  7. SUMPRODUCT((ISNUMBER(SEARCH() function
    By redneck joe in forum Excel General
    Replies: 13
    Last Post: 12-08-2006, 06:19 PM

Tags for this Thread

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