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

1. ## 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

2. ## 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)

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

Try

=SUMPRODUCT((C2:C6)*(ISNUMBER(SEARCH(E2,B2:B6))))

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

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

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### 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