groovymonkey
asked on
MS EXCEL COUNTIF can it be used to pull a string value from a cell that has multiple string combinations
Hello,
I am by no means knowledgebale with MS Excell so bear with me....I am currently using the following in excel...what I want to do is figure out if there is a way to look at the cell and if there is a value like eee www bbb in s2 etc...still be able to pull out the eee (lets say this is the value of b2) and when it gets to the next row (b3) pull out and count the www if this is what B3 is defined as...
=COUNTIF(Log!$S$2:S$1000,B 2)
I am by no means knowledgebale with MS Excell so bear with me....I am currently using the following in excel...what I want to do is figure out if there is a way to look at the cell and if there is a value like eee www bbb in s2 etc...still be able to pull out the eee (lets say this is the value of b2) and when it gets to the next row (b3) pull out and count the www if this is what B3 is defined as...
=COUNTIF(Log!$S$2:S$1000,B
Btw FIND is case sensitive, but SEARCH is not.
ASKER
hmm I do not think that is what I mean...okay here is what the table sort of looks like
I have a column with category...but there are multiple categories so instead of creating the categories across the top (a column for each) I would like to place MULTIPLE acronymns in the category cell ....
e.g.
worksheet log (column S)
Category
awol pita
pita rem
in another worksheet I am attempting to tally each category
awol 1
pita 2
rem 1
I have a column with category...but there are multiple categories so instead of creating the categories across the top (a column for each) I would like to place MULTIPLE acronymns in the category cell ....
e.g.
worksheet log (column S)
Category
awol pita
pita rem
in another worksheet I am attempting to tally each category
awol 1
pita 2
rem 1
I think this array formula works (ctrl+shift+enter to use)
=SUM(IF(ISNUMBER(FIND(B2,$ S$2:$S$3)) ,1,0))
if your categories are listed in B2 down and your log is S2 and down - adjust as necessary.
=SUM(IF(ISNUMBER(FIND(B2,$
if your categories are listed in B2 down and your log is S2 and down - adjust as necessary.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Doh!
ASKER
tried this...not working only summed one category and it only counted one of the entries (there were 2)
=SUM(IF(ISNUMBER(FIND(B2,L og!$T$2:Lo g!$T$1000) ),1,0))
=SUM(IF(ISNUMBER(FIND(B2,L
Did you enter it as an array formula?
In any case Barry's formula is much better.
In any case Barry's formula is much better.
Did you try my COUNTIF suggestion?....or Stephen's version needs to be confirmed with CTRL+SHIFT+ENTER...
The FIND (or SEARCH) approach is a valid alternative - it can be useful if you want case-sensitivity (FIND) or if you want to search for text that might be included in other text, e.g. if you want to search for "ee" and separately "eee" then my COUNTIF version will count any "ee"s which are included in "eee"s, so assuming that each category is separated by a space in column S you could use this version
=SUMPRODUCT(ISNUMBER(SEARC H(" "&B2&" "," "&$S$2:$S$1000&" "))+0)
regards, barry
The FIND (or SEARCH) approach is a valid alternative - it can be useful if you want case-sensitivity (FIND) or if you want to search for text that might be included in other text, e.g. if you want to search for "ee" and separately "eee" then my COUNTIF version will count any "ee"s which are included in "eee"s, so assuming that each category is separated by a space in column S you could use this version
=SUMPRODUCT(ISNUMBER(SEARC
regards, barry
ASKER
Awesome!
=IF(ISNUMBER(FIND(B2,S2)),