Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Cell Counter/Increment

I'm trying to write a formula to produce results such as:

AA 1
BB 0
BB 0
AA 2
AA 3
BB 0
AA 4
CC 0

Column A is a (drop-down) data validated list of 'AA,BB,CC'.
Column B is the counter cell.

Every 'AA' increments a counter, anything not 'AA' yields a 0.

I've tried using the countif but it seems to give me a sum rather than what I'm looking for, at least to what I understand its use of from the help.

Is this possible in a formula? I'd rather not have to use VBA code if at all possible.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 587
Default Cell Counter/Increment

hi,

=IF(A1="AA",COUNTIF($A$1:A1,"AA"),0)

and fill down

isabelle


Le 2013-07-09 21:03, User a écrit :
I'm trying to write a formula to produce results such as:

AA 1
BB 0
BB 0
AA 2
AA 3
BB 0
AA 4
CC 0

Column A is a (drop-down) data validated list of 'AA,BB,CC'.
Column B is the counter cell.

Every 'AA' increments a counter, anything not 'AA' yields a 0.

I've tried using the countif but it seems to give me a sum rather than what I'm looking for, at least to what I understand its use of from the help.

Is this possible in a formula? I'd rather not have to use VBA code if at all possible.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Cell Counter/Increment

On Tue, 09 Jul 2013 21:37:20 -0400, isabelle wrote:

Thanks so much. This worked perfect. I was missing the anchor $A$1,
never thought of that!

hi,

=IF(A1="AA",COUNTIF($A$1:A1,"AA"),0)

and fill down

isabelle


Le 2013-07-09 21:03, User a écrit :
I'm trying to write a formula to produce results such as:

AA 1
BB 0
BB 0
AA 2
AA 3
BB 0
AA 4
CC 0

Column A is a (drop-down) data validated list of 'AA,BB,CC'.
Column B is the counter cell.

Every 'AA' increments a counter, anything not 'AA' yields a 0.

I've tried using the countif but it seems to give me a sum rather than what I'm looking for, at least to what I understand its use of from the help.

Is this possible in a formula? I'd rather not have to use VBA code if at all possible.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I set up a counter cell? Valpocandi Excel Worksheet Functions 2 September 11th 07 06:59 PM
Cell counter Haza Excel Discussion (Misc queries) 2 January 20th 06 02:18 PM
Increment a counter in Excel COSdl Excel Worksheet Functions 2 March 4th 05 09:47 PM
Before print increment counter webfort Excel Programming 2 April 6th 04 11:56 AM
automatic counter or auto-increment Jjt Excel Programming 1 January 16th 04 07:56 PM


All times are GMT +1. The time now is 03:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"