![]() |
Counting Occurances (2003)
I have a cell that contains....
"2 red hat, 1 green glove, 2 red glove, 2 yellow hat" What I need to be able to do is; count the number of items containing "2 red" and return the value 4. And; count the number of items containing "2 yellow" and return the value 2. I've tried using COUNTIF, FIND, SEARCH, etc. and can't come up with a way to do it. Thank you in advance for your help! |
Counting Occurances (2003)
hi can you please put int in grid format so that i can figure it out what you want? "PeterM" wrote: I have a cell that contains.... "2 red hat, 1 green glove, 2 red glove, 2 yellow hat" What I need to be able to do is; count the number of items containing "2 red" and return the value 4. And; count the number of items containing "2 yellow" and return the value 2. I've tried using COUNTIF, FIND, SEARCH, etc. and can't come up with a way to do it. Thank you in advance for your help! |
Counting Occurances (2003)
Hi. Here is one way. The 2 is the value, and the 5 is the length of "2
Red" For "2 Yellow", you would use 2/8 (or 1/4) =(2/5)*(LEN(A1)-LEN(SUBSTITUTE(A1,"2 red",""))) = = = = = = = = = = HTH :) Dana DeLouis On 1/3/10 12:49 AM, PeterM wrote: I have a cell that contains.... "2 red hat, 1 green glove, 2 red glove, 2 yellow hat" What I need to be able to do is; count the number of items containing "2 red" and return the value 4. And; count the number of items containing "2 yellow" and return the value 2. I've tried using COUNTIF, FIND, SEARCH, etc. and can't come up with a way to do it. Thank you in advance for your help! |
All times are GMT +1. The time now is 03:51 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com