ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Counting multiple cells containing text. (https://www.excelbanter.com/excel-worksheet-functions/192696-counting-multiple-cells-containing-text.html)

bSB

Counting multiple cells containing text.
 
I am trying to track 3 error types (type1, type2, type3) for two different
regions (region1, region2). Column D (D10:D20) lists the regions in varying
orders while Columns G,H,I (G10:I20) list the error types if there is one.

Ex: ~Row 10 has region1(D10) containing errors: type1(G10) type2(H10)
type3(I10)
~Row 11 has region2(D11) containing errors: type1(G11) type2(H11)
~Row 12 has region1(D12) containing errors: type2(G12)

Every time Column D contains €śregion1€ť I want it to count the corresponding
errors in that row Columns G:I. Same for €śregion2€ť.

So in my example region1 should have 4 errors while region2 should have 2
errors. Hope this makes sense, I really appreciate the help.


T. Valko

Counting multiple cells containing text.
 
Try this:

=SUMPRODUCT((D10:D20="region1")*(G10:I20<""))
=SUMPRODUCT((D10:D20="region2")*(G10:I20<""))

I'm assuming that G:I will contain only error types and no other text or
numeric values. So, all you need to do is count those cells in G:I that
aren't empty/blank.

--
Biff
Microsoft Excel MVP


"bSB" wrote in message
...
I am trying to track 3 error types (type1, type2, type3) for two different
regions (region1, region2). Column D (D10:D20) lists the regions in
varying
orders while Columns G,H,I (G10:I20) list the error types if there is one.

Ex: ~Row 10 has region1(D10) containing errors: type1(G10) type2(H10)
type3(I10)
~Row 11 has region2(D11) containing errors: type1(G11) type2(H11)
~Row 12 has region1(D12) containing errors: type2(G12)

Every time Column D contains "region1" I want it to count the
corresponding
errors in that row Columns G:I. Same for "region2".

So in my example region1 should have 4 errors while region2 should have 2
errors. Hope this makes sense, I really appreciate the help.





All times are GMT +1. The time now is 10:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com