+ Reply to Thread
Results 1 to 8 of 8

Using SUMIF with LEFT Function

  1. #1
    Registered User
    Join Date
    02-22-2017
    Location
    West Africa
    MS-Off Ver
    2010
    Posts
    2

    Using SUMIF with LEFT Function

    Hi guys, I need your help...

    I have 3 columns named LongCol, B and Amount

    i want to add Amount if LEFT(LongCol,3) = B5 ie if the first 3 digits of LongCol is equal Cell B5

    I have tried this but it did not work:

    =SUMIF((LEFT(LongCol,3),B5,Amount)).

    please help

    I

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,058

    Re: Using SUMIF with LEFT Function

    Here, try this:

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

  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Using SUMIF with LEFT Function

    Hi,

    You can use SUMIF thus
    =SUMIF(LongCol,B5&"*",Amount)
    Don
    Please remember to mark your thread 'Solved' when appropriate.

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

    Re: Using SUMIF with LEFT Function

    Try

    =SUMPRODUCT((LEFT(LongCol,3)=B5)*(Amount))

    SUMIF does not allow use of LEFT

    but try

    =SUMIF(LongCol,B5 &"*",Amount)

  5. #5
    Registered User
    Join Date
    02-22-2017
    Location
    West Africa
    MS-Off Ver
    2010
    Posts
    2

    Re: Using SUMIF with LEFT Function

    Thanks guys. None of them worked. Let me think of a walk around while await further expert guides.

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

    Re: Using SUMIF with LEFT Function

    Post a file as all the above do work.

    Please attach a file (not image) so that respondents (a) do not have to type in data and (b) have data with which test any formulas. Ensure the data is representative of your actual "real world" data.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the (remove confidential) data.

    To Attach a File:

    1. Scroll down to the window below your post Additional Options
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,745

    Re: Using SUMIF with LEFT Function

    Withdrawn by FR. Missed a detail.
    Last edited by FlameRetired; 02-22-2017 at 12:30 PM.
    Dave

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

    Re: Using SUMIF with LEFT Function

    The above look like they should work, check B5 to see if it has leading/trailing spaces?
    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

+ 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] How to nest a left function within a sumif function?
    By LisaK in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2017, 09:21 AM
  2. [SOLVED] SUMIF function but the SUM RANGE is on the LEFT SIDE of the CRITERIA.
    By Jarvin24 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-19-2014, 11:02 PM
  3. [SOLVED] sumif with left function
    By adste89 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-24-2013, 06:48 AM
  4. Sumif with Left
    By ashtanga in forum Excel General
    Replies: 7
    Last Post: 10-08-2010, 04:10 PM
  5. Sumif & left?
    By Koda7 in forum Excel General
    Replies: 5
    Last Post: 08-05-2010, 03:55 PM
  6. sumif function when left 4 texts are matching
    By Vikram Dhemare in forum Excel General
    Replies: 1
    Last Post: 04-25-2006, 03:30 AM
  7. LEFT command with SUMIF
    By Duncan Help in forum Excel General
    Replies: 2
    Last Post: 09-27-2005, 04:05 PM

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