# Count only if...

#### Milos038

##### New Member
Hi
I need help how to make formula for counting only if is matching word selected in other shell (from drop down list)
Example like on picture

Screenshot by Lightshot

thx

### Excel Facts

Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

#### oldbrewer

##### Well-known Member
=countif(A1:A10,"red") will count all the cells equal to red

#### PlusX EAI

##### New Member
Maybe you want something like this:

Code:
``=SUMIF(C:C;G4;D:D)-SUMIF(C:C;G4;E:E)``

in G4 and then copy down

#### Milos038

##### New Member
Maybe you want something like this:

Code:
``=SUMIF(C:C;G4;D:D)-SUMIF(C:C;G4;E:E)``

in G4 and then copy down

You are genius
you help me realy much

#### Milos038

##### New Member
But now I cant use this result for next calculation
I need result from "H" to use in next table but cant

#### PlusX EAI

##### New Member
Explain what you are trying to do ?

#### Milos038

##### New Member
I already have other table where I count in,out and sold items.
I need to calculate this result together with rest callculation
example

F3 is IN delivery
G3 is stocked items
H3is OUT
K3 is SUM

C3 is sum recived with previous operation what we already talked
I need to put in K3 formula: =F3+G3-H3+c3

#### PlusX EAI

##### New Member
The error says that you are double using a cell, so if your F,G,H values are already used in the "c" cell calculation, they may create an error. Try to clarify your formula and result.

#### Milos038

##### New Member
Resolved
I move table on other place

Replies
5
Views
176
Replies
0
Views
350
Replies
0
Views
133
Replies
1
Views
242
Replies
2
Views
579

1,191,609
Messages
5,987,651
Members
440,105
Latest member
thigarette

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