+ Reply to Thread
Results 1 to 4 of 4

How to sumif based on x number of characters in a range

  1. #1
    Registered User
    Join Date
    06-24-2020
    Location
    Philadelphia, PA
    MS-Off Ver
    Office 365
    Posts
    11

    How to sumif based on x number of characters in a range

    Hi -
    Looking to sumif location = TRENTON. In the example, there could be multiple TRENTON's, like TRENTON, TRENTON YARD. Would like sum all that has TRENTON in the range.

    I've tried LEFT(), to no avail.

    Any ideas?

    Thanks,
    Sluggy
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
    Posts
    60,648

    Re: How to sumif based on x number of characters in a range

    Try:

    =COUNTIF($B$2:$B$6,E2&"*")

    and:

    =SUMIF($B$2:$B$6,E2&"*",$C$2:$C$6)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" to anyone who has offered you help in your thread. You can reward them by clicking on * Add Reputation below theur user name on the left, if you wish.


    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    22,869

    Re: How to sumif based on x number of characters in a range

    Try

    =SUMPRODUCT((C2:C6)*(ISNUMBER(SEARCH(E2,B2:B6))))
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Registered User
    Join Date
    06-24-2020
    Location
    Philadelphia, PA
    MS-Off Ver
    Office 365
    Posts
    11

    Re: How to sumif based on x number of characters in a range

    Hi AliGW -
    That did it!!!! Thank you so much

+ 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] Multiple SUMIF formula based on first few characters of cell...
    By nimv1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-29-2018, 04:12 AM
  2. To Sum a range containing 3 text Characters then a number
    By chrisandsally in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 04-05-2015, 09:35 AM
  3. Conditional Formatting based on number of characters
    By amartino44 in forum Excel General
    Replies: 3
    Last Post: 10-11-2013, 05:30 PM
  4. Sumif based on first few characters of a column
    By Mile029 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-14-2013, 06:08 PM
  5. [SOLVED] Validating number of characters in a cell range
    By johnph in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 08-21-2012, 01:18 PM
  6. Count the number of different characters in a range
    By aderougemont in forum Excel General
    Replies: 4
    Last Post: 01-12-2009, 11:36 AM
  7. Deleting rows based on number of characters
    By catalfamo1220 in forum Excel General
    Replies: 3
    Last Post: 07-20-2006, 01:31 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