+ Reply to Thread
Results 1 to 8 of 8

Sumif using 1st 6 numbers

  1. #1
    Registered User
    Join Date
    07-25-2010
    Location
    PA
    MS-Off Ver
    Excel 365
    Posts
    47

    Sumif using 1st 6 numbers

    Hello All,

    My data consists of 1000s of rows in "sheet1". All the data is labeled with this format in column D: 111111abc, 111112bca, 111111def, etc.

    On a separate tab "sheet2" I have a list with only account numbers in column A. So it only contains numbers. 111111, 111112, 111115, etc

    How can I do a sumif if on this tab to only add sums based on 1st 6 numbers?


    Thank you!

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Sumif using 1st 6 numbers

    with a helpcolumn in column E

    E2=Left(d2,6) and drag down.

    After that a pivot table to analyse the data.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Sumif using 1st 6 numbers

    Hi,
    you mean SUMIF or COUNTIF?

    what do you want to sum up? which column?
    Here's an example how it can be done with a COUNTIF:
    =SUM(COUNTIF(Sheet2!A1,TEXT(LEFT(Sheet1!D1:D3,6),0)))
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-25-2010
    Location
    PA
    MS-Off Ver
    Excel 365
    Posts
    47

    Re: Sumif using 1st 6 numbers

    Your right that information would help... I need a sumif... assume in your sample on sheet1 column E had totals.

  5. #5
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Sumif using 1st 6 numbers

    You have 2 ways (that I know of....):

    =SUM(COUNTIF(Sheet2!A1,TEXT(LEFT(Sheet1!$D$1:$D$15,6),0))*(Sheet1!$E$1:$E$15))

    =SUMPRODUCT((TEXT(A1,0)=LEFT(Sheet1!$D$1:$D$15,6))*(Sheet1!$E$1:$E$15))

    See attached example.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    07-25-2010
    Location
    PA
    MS-Off Ver
    Excel 365
    Posts
    47

    Re: Sumif using 1st 6 numbers

    This is perfect! Thank you so much!

  7. #7
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Sumif using 1st 6 numbers

    you're welcome : )

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Sumif using 1st 6 numbers

    and a solution using pivot table.

    See the attached file.

+ 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 SUMIF to look for anything where the first 4 characters are all numbers?
    By Kaarthuul in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-01-2022, 12:14 PM
  2. [SOLVED] SUMIF Not Adding All Numbers
    By wudevr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-20-2020, 02:02 PM
  3. How to do SUMIF's for numbers in a certain range.
    By chkn89 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-06-2020, 06:04 PM
  4. Sumif between certain numbers
    By karstens in forum Excel General
    Replies: 9
    Last Post: 08-31-2009, 04:27 PM
  5. Column Has Text and Numbers, Need To SUMIF Only Numbers
    By Karleajensar in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-04-2008, 01:27 PM
  6. [SOLVED] Removing minus numbers from a sumif
    By nir020 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-08-2006, 08:10 AM
  7. Sumif for letters instead of numbers
    By okanem in forum Excel General
    Replies: 2
    Last Post: 02-02-2005, 08:59 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