Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default count cells, then reset count when value in another cell changes

I am trying to create a function that will assign number for TaskID. It will
restart a count everytime there is a '0' in the Step column. This will be
used for a database to group taskID and task separate. IF(a2 = 0, (0+1) <
this does not work. Do you know how to do this?

Step TaskID
0 1
1 1
2 1
0 2
1 2
2 2
3 2
4 2
0 3
1 3
2 3
3 3
4 3
5 3

--
Misty :-)

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200902/1

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default count cells, then reset count when value in another cell changes

One way...

Assuming the first entry is *always* 0.

Enter 1 in B2

Enter this formula in B3 and copy down as needed:

=IF(A3=0,B2+1,B2)

--
Biff
Microsoft Excel MVP


"Mitchell_Collen via OfficeKB.com" <u33726@uwe wrote in message
news:91f7b91409b5c@uwe...
I am trying to create a function that will assign number for TaskID. It
will
restart a count everytime there is a '0' in the Step column. This will be
used for a database to group taskID and task separate. IF(a2 = 0, (0+1) <
this does not work. Do you know how to do this?

Step TaskID
0 1
1 1
2 1
0 2
1 2
2 2
3 2
4 2
0 3
1 3
2 3
3 3
4 3
5 3

--
Misty :-)

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200902/1



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default count cells, then reset count when value in another cell changes

Try this:

=COUNTIF($A$2:A2,0)
copy down


"Mitchell_Collen via OfficeKB.com" wrote:

I am trying to create a function that will assign number for TaskID. It will
restart a count everytime there is a '0' in the Step column. This will be
used for a database to group taskID and task separate. IF(a2 = 0, (0+1) <
this does not work. Do you know how to do this?

Step TaskID
0 1
1 1
2 1
0 2
1 2
2 2
3 2
4 2
0 3
1 3
2 3
3 3
4 3
5 3

--
Misty :-)

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200902/1


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default count cells, then reset count when value in another cell changes

Thanks!

--
Misty :-)

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200902/1

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default count cells, then reset count when value in another cell chang

You're Welcome!


"Mitchell_Collen via OfficeKB.com" wrote:

Thanks!

--
Misty :-)

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200902/1


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
Count the letters in the cells and sum in another cell George Excel Worksheet Functions 1 November 20th 08 10:10 AM
Reset sheet count Dan Excel Discussion (Misc queries) 3 July 17th 07 10:35 PM
can i use the color of a cell to count the different colerd cells scott Excel Discussion (Misc queries) 1 June 17th 06 01:49 AM
Get first character in cell and count all cells that begin with 1,2,3 etc [email protected] Excel Discussion (Misc queries) 5 June 8th 06 05:04 PM
count non empty cells if other cell has certain value Nico Excel Discussion (Misc queries) 5 May 18th 06 10:40 AM


All times are GMT +1. The time now is 01:33 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"