# Dsum String

#### jamielill

##### Active Member
Hi All,
I am trying to count the number of times the word apple appears. I have looked at my formula and cannot find the error.
It keeps showing zero
Any help would be appreciated

Thanks you all

A
B
C
1
qty
 name

<colgroup><col width="31"><col width="63"></colgroup><tbody>
</tbody>
2
2
apple
3
1
test
4
3
apple
5
6
7
qty
name
8
=DSUM(B1:C5,"name",B7:C8)
="apple"
9
10

<tbody>
</tbody>

### Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
In C8, remove the = and "s so it just says apple.
This formula gives the number of times the word apple appears: =COUNTIF(B1:C5,C8)
This formula gives the total qty in Col B next to the word apple: =SUMIF(C1:C5,C8,B1:B5)

Hi, i removed the = and both quotation marks but the cell still displays a zero

-- removed inline image ---

Last edited:
Removing the = and "s was intended so my 2 formulas would work. Are you referring to your original formula? Or are you saying you're getting 0's on my 2 formulas?

 qty name 2 apple 1 test 3 apple qty name 5 =apple

<colgroup><col style="width: 47pt; mso-width-source: userset; mso-width-alt: 2218;" width="62"> <col style="width: 48pt;" span="3" width="64"> <tbody>
</tbody>

B8, just enter:

=DSUM(B1:C4,"qty",C7:C8)

C8, just enter:

="=apple"

Hi, I want to count the word apple it should be 2 but it comes out to zero

Hi, I want to count the word apple it should be 2 but it comes out to zero

Try...

=DCOUNTA(B1:C4,"name",C7:C8)

Replies
10
Views
281
Replies
0
Views
745
Replies
0
Views
311
Replies
3
Views
300
Replies
3
Views
229

1,206,971
Messages
6,075,925
Members
446,170
Latest member
zzzz02

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back