Getting count

  • Thread starter Thread starter vernalGreens
  • Start date Start date
V

vernalGreens

Sheet1
Column A
"This is my string1"
This is my string2
This is my string1 again
This is my string3
Hey This is my string1 string1
....
....

Sheet2
ColumnA
ColumnB
No of times the text string1 appeared in sheet1 3
No of times the text string2 appeared in sheet1 1
No of times the text string3 appeared in sheet1 1

Can you help me create columnB in sheet2? If a particular string, say,
string 1, appears multiple times in the same row, the count increments
only by 1, not by the number of occurences in a particular row.
 
In sheet2, assuming you have "String1" in column A1, enter in A2:
=SUMPRODUCT(--ISNUM(FIND(A2;Sheet1!$A$1:$A$5)))


HTH
 
A little change.

Sheet1
Column A ColumnB
"This is my string1" Count
This is my string2 Count
This is my string1 again Don't Count
This is my string3 Count
Hey This is my string1 string1 Count

Sheet2
ColumnA
ColumnB
No of times the text string1 appeared in sheet1 2
No of times the text string2 appeared in sheet1 1
No of times the text string3 appeared in sheet1 1

If columnB in sheet 1 is "count", only then the stingx in columnA will
be counted. What should my formula be now?
 
Back
Top