+ Reply to Thread
Results 1 to 5 of 5

Formula not "SUMMING" everything starting with same digits

  1. #1
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Formula not "SUMMING" everything starting with same digits

    Hope someone can see the wood for the trees, here.

    As shown on the attached Sum of first digits.xlsx, Col A has three-digit product numbers.

    Can't see why the following formula does not identify and total only the values in Col B where the number in Col A starts with the first two digits in A1 ("11") and ignores any starting "12" or "13":

    "=SUMIF(A1:A5,LEFT(A1,2),B1:B5)"

    Any pointers or solutions accepted gratefully, as ever.

    Ochimus

  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Formula not "SUMMING" everything starting with same digits

    Hi
    Use
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Regards

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,942

    Re: Formula not "SUMMING" everything starting with same digits

    That will never work because you have told it the criteria needs to have only 2 characters, but your criteria range contain s 3

    Try this instead...
    =SUMPRODUCT(--(LEFT($A$1:$A$5,2)=LEFT(A1,2)),$B$1:$B$5)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Re: Formula not "SUMMING" everything starting with same digits

    Thanks to both for prompt response.

    Should have been obvious to me that the formula had to look at the same number of digits in Col A as the "control" in A1.

    Ochimus

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,942

    Re: Formula not "SUMMING" everything starting with same digits

    Happy to help, thanks for the feedback

+ 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. Replies: 1
    Last Post: 03-27-2015, 04:01 PM
  2. Replies: 11
    Last Post: 12-10-2014, 03:00 PM
  3. [SOLVED] Summing multiple sheets with a "contains" formula
    By Excel N00b in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-15-2014, 01:13 AM
  4. [SOLVED] Find "__"x"__" regardless of digits. The anti-concatenate....
    By esmithqg in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-02-2013, 10:42 PM
  5. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  6. Simple? Formula for "for the week starting Monday May Xxth"
    By nmorse in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-27-2006, 12:52 PM
  7. If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ...
    By Maria J-son in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2006, 08:25 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