# SUMIF and COUNTIF first word on cell (before first space)

1. ## SUMIF and COUNTIF first word on cell (before first space)

I'm trying to use =COUNTIF(A:A;A5&" *") on a workbook to count the first word on a cell before space but it's not working.

Example:

DP Shirt
DP Bike
A123 Car

I want to get Total=

2x DP
1x A123

Workbook2.xlsx

2. ## Re: SUMIF and COUNTIF first word on cell (before first space)

Try these two

=SUMIF(A4:A8,"DP*",B4:B8)

=COUNTIF(A4:A8,"DP*")

3. ## Re: SUMIF and COUNTIF first word on cell (before first space)

Try ..

=SUMIF(\$A:\$A,LEFT(\$A4,FIND(" ",\$A4,1)-1)&"*",\$B:\$B)

=COUNTIF(\$A:\$A,LEFT(\$A4,FIND(" ",\$A4,1)-1)&"*")

Generic formula

Copy down

4. ## Re: SUMIF and COUNTIF first word on cell (before first space)

Thank you Guys.

Both worked but i had to change , with ; .

Thank's again.

##### Users Browsing this Thread

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