ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count occurances in range of cells (https://www.excelbanter.com/excel-worksheet-functions/44249-count-occurances-range-cells.html)

Ed Gregory

Count occurances in range of cells
 
Hello,

I have a range of cells that have multiple values separated by commas. What
I need to do is count the occurrences of a value in a range of cells.

Example:
Cell: A1
Value: win2k,winxp,win2003,win98

Cell: A2
Value: winxp,win2003

Cells A3-100
Value: <same type of format as above

I need formula that will get number of occurances of "winxp" in each cell in
the range. A cell can have multiple values separated by commas and could,
but shouldn't have duplicate values in cell. I have tried countif with a
wildcard but that only works if search value is first value in cell.

Thank you in advance.



JE McGimpsey

One way:

=COUNTIF(A:A,"*winxp*")

In article ,
"Ed Gregory" wrote:

Hello,

I have a range of cells that have multiple values separated by commas. What
I need to do is count the occurrences of a value in a range of cells.

Example:
Cell: A1
Value: win2k,winxp,win2003,win98

Cell: A2
Value: winxp,win2003

Cells A3-100
Value: <same type of format as above

I need formula that will get number of occurances of "winxp" in each cell in
the range. A cell can have multiple values separated by commas and could,
but shouldn't have duplicate values in cell. I have tried countif with a
wildcard but that only works if search value is first value in cell.

Thank you in advance.



All times are GMT +1. The time now is 05:48 AM.

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