| View previous topic :: View next topic |
| Author |
Message |
Sithlyone Power User

Joined: 13 Jan 2012 Posts: 98
|
Posted: Tue Feb 28, 2012 1:16 pm Post subject: formula that counts number of times a word is entered in a c |
|
|
Hello I have need for a formula that counts the amount of times a word is entered into a cell.
I have a macro that loops names in a cell and I would like to have another cell keep track of how many times a particular name is entered.
Countif will only count it while the name is in the cell and then it will go back to zero. Is there a way to use the countif function and keep the value and make it add to the previous number in the cell?
Thanks for your help. |
|
| Back to top |
|
 |
mgroenescheij Super User

Joined: 20 Apr 2011 Posts: 862 Location: Australia
|
Posted: Tue Feb 28, 2012 2:16 pm Post subject: |
|
|
Hi,
You can use a helper column to store the count in and total the column.
Martin _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
Sithlyone Power User

Joined: 13 Jan 2012 Posts: 98
|
Posted: Tue Feb 28, 2012 6:53 pm Post subject: |
|
|
Thanks for the info, but what is a "Helper column and how do I get the count to go to the different cells?
I can understand the part about totally the column, i'm just confused on how to make the column do what you are suggesting. |
|
| Back to top |
|
 |
mgroenescheij Super User

Joined: 20 Apr 2011 Posts: 862 Location: Australia
|
Posted: Tue Feb 28, 2012 7:44 pm Post subject: |
|
|
Hi,
Assume you have the word you like to count in column A and you have data up to column Z.
Enter the COUNTIF formula in column AA drag the formula down as far as needed and Sum the column in a cell of your preference.
You could hide the column if you prefer.
Martin _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
Sithlyone Power User

Joined: 13 Jan 2012 Posts: 98
|
Posted: Tue Feb 28, 2012 8:04 pm Post subject: |
|
|
I think I understand what you are saying but I don't think it will work the way you are saying for my purposes.
I have a cell that rotates names in it automatically based off of a macro. Each time a specific name rotates through I want to add a +1 in another cell. Thus it counts the amount of times that name shows up in that rotating cell.
Now if I can use your suggestion and accomplish this I don't know how.
I am still new to calc so I may be over looking something.
Thank you for your help. |
|
| Back to top |
|
 |
mgroenescheij Super User

Joined: 20 Apr 2011 Posts: 862 Location: Australia
|
Posted: Tue Feb 28, 2012 8:23 pm Post subject: |
|
|
Hi,
| Sithlyone wrote: | | Countif will only count it while the name is in the cell and then it will go back to zero | Well you said that you could use it while the name is in the cell. You didn't mention anything else.
Nevertheless Rotated text could still be find by a formula, unless you your macro does something strange.
Martin _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
Sithlyone Power User

Joined: 13 Jan 2012 Posts: 98
|
Posted: Tue Feb 28, 2012 8:51 pm Post subject: |
|
|
Countif does find it while the name is there but after another name appears in the cell the countif formula goes back to zero.
What I need is for it to stay at 1 and the next time that name appears to add a +1. |
|
| Back to top |
|
 |
karolus OOo Advocate

Joined: 22 Jun 2011 Posts: 208
|
Posted: Wed Feb 29, 2012 1:28 am Post subject: |
|
|
Hi
If you 'rotate the names' by Makro, you can do the Counting job also by Makro.
Karo |
|
| Back to top |
|
 |
Sithlyone Power User

Joined: 13 Jan 2012 Posts: 98
|
Posted: Wed Feb 29, 2012 5:53 am Post subject: |
|
|
| I would think so, but i don't have the knowledge to create that macro. If you know how to make that, that would be awesome. |
|
| Back to top |
|
 |
|