#1   Report Post  
Posted to microsoft.public.excel.misc
Ed
 
Posts: n/a
Default Reset Counter

Hello,

In Column A, I have this list of 1's and empty cells*, i would like to have
in column B a function that gives me the next result:

*A1=1 B=1
*A2=1 B=2
*A3=1 B=3
*A4="" B=""
*A5=1 B=1
*A6=1 B=2
*A7="" B=""
*A8=1 B=1
*A9=1 B=2
*A10=1 B=3

It would be like a counter that tells me the number of times 1 has appeared
so far, but when it reaches: "" it restarts and goes on again.

,thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bryan Hessey
 
Posts: n/a
Default Reset Counter


In B1 put

=IF(A1<1,"",1)

In B2 put

=IF(A2<1,"",1+IF(B1="",0,B1))

and formula drag that down as far as you need.

--

Ed Wrote:
Hello,

In Column A, I have this list of 1's and empty cells*, i would like to
have
in column B a function that gives me the next result:

*A1=1 B=1
*A2=1 B=2
*A3=1 B=3
*A4="" B=""
*A5=1 B=1
*A6=1 B=2
*A7="" B=""
*A8=1 B=1
*A9=1 B=2
*A10=1 B=3

It would be like a counter that tells me the number of times 1 has
appeared
so far, but when it reaches: "" it restarts and goes on again.

,thanks



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=532927

  #3   Report Post  
Posted to microsoft.public.excel.misc
Niek Otten
 
Posts: n/a
Default Reset Counter

In B1:
=IF(A1="",0,1)
In B2:
=IF(A2="",0,B1+1)
Copy down as far as you need

Format Custom as "General;General;" to suppress zeros

--
Kind regards,

Niek Otten

"Ed" wrote in message ...
| Hello,
|
| In Column A, I have this list of 1's and empty cells*, i would like to have
| in column B a function that gives me the next result:
|
| *A1=1 B=1
| *A2=1 B=2
| *A3=1 B=3
| *A4="" B=""
| *A5=1 B=1
| *A6=1 B=2
| *A7="" B=""
| *A8=1 B=1
| *A9=1 B=2
| *A10=1 B=3
|
| It would be like a counter that tells me the number of times 1 has appeared
| so far, but when it reaches: "" it restarts and goes on again.
|
| ,thanks


  #4   Report Post  
Posted to microsoft.public.excel.misc
Ed
 
Posts: n/a
Default Reset Counter

Hello again, both formulas work fine, but I forgot to mention a small detail
when I was explaining the problem the first time, sorry about that... Both
formulas are referenced to the upper cell, so when I delete a row i get #REF!
as a result until the next blank cell. Do you have any suggestions to
overcome that problem? The file in which I am working with is meant to have
posibility to delete rows once in a while.

thanks again, really!

Ed
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
Counter Sdbenn90 Excel Discussion (Misc queries) 4 January 9th 06 11:43 AM
Establish Default Titles For Drop Windows And Reset Button travelersway New Users to Excel 0 October 17th 05 11:58 AM
Autofilter reset button Cheese Excel Discussion (Misc queries) 6 July 9th 05 06:39 PM
Reset Button in Excel? Jan C. Excel Worksheet Functions 3 July 2nd 05 02:08 AM
Creating a counter that does not include hidden rows TechMGR Excel Discussion (Misc queries) 1 April 4th 05 10:11 PM


All times are GMT +1. The time now is 03:28 PM.

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

About Us

"It's about Microsoft Excel"