# Count a cell if another cell meets a criteria

#### Welshcharles

##### New Member
I have a worksheet which I record issue of work wear, the upper part of the sheet records the items issued to each person and the lower section is a record of how much is issued of each size.
How can I automated the completion of the lower section, for example, if name 1 has 2 polo shirts size M then this is automatically entered into B18 in the lower section.

Any assistance would be greatly appreciated.

 Name1 Name2 Name3 Name4 Name5 Name6 Name7 Name8 Name9 Name10 ITEM QTY SIZE QTY SIZE QTY SIZE QTY SIZE QTY SIZE QTY SIZE QTY SIZE QTY SIZE QTY SIZE QTY SIZE Polo Shirts 2 XL Shirt Short sleeve 5 16" Shirt Long Sleeve Sweat Shirts 2 XL Trousers 2 36" 2 36w 30l Hi Viz Jacket Coveralls 2 46R Woolly Hat 1 1 1 1 1 1 1 1 1 1 Bib & Brace Fabric Safety Boots Storm Jacket Bib & Brace W/P 1 M Hard Hat N/A ITEM QTY SIZE QTY SIZE QTY SIZE QTY SIZE QTY SIZE QTY SIZE Polo Shirts M L XL XXL XXXL Shirt Short sleeve 16 16.5 17 17.5 18 Shirt Long Sleeve 16 16.5 17 17.5 18 Sweat Shirts M L XL XXL XXXL Trousers 28W 30W 32W 34W 36W Hi Viz Jacket M L XL XXL XXXL Coveralls 38 40 42 44 46 Woolly Hat 10 N/A Bib & Brace Fabric M L XL XXL XXXL Safety Boots 8 9 10 11 12 Storm Jacket M L XL XXL XXXL Bib & Brace W/P M L XL XXL XXXL Hard Hat

<tbody>
</tbody>

### Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
i used an array formula
=SUM(IF(\$C4:\$U4=C20, \$B4:\$T4, 0))
and used control +shift +enter to change to an array, then you get {}
{=SUM(IF(\$C4:\$U4=C20, \$B4:\$T4, 0))}
seems to work OK

Replies
0
Views
151
Replies
1
Views
227
Replies
1
Views
496
Replies
4
Views
961
Replies
4
Views
474

1,196,048
Messages
6,013,095
Members
441,747
Latest member
darkman77

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