Numbering - Starting Over Based on Zero

  • Thread starter Thread starter desmarteau
  • Start date Start date
D

desmarteau

I have a sheet that is like this:

A B C
content 0 Yes
content
content
content 0 Yes
content
content
content
content
content 0 Yes
content
content
content


What I want to do is number column b as 0,1,2,3,4,5 etc and start over
numbering when it hits a 0.

How would I do that with a macro....or is there an easier way.

Any help would be so appreciated.

Thanks,
Louise
 
Without a macro the easiest way would probably be something like this...

In Cell B2 add the formula =B1 + 1
Copy Cell B2
Highlight the entire area of Column B where you want to add the numbers
(like B1:B100)
Select F5 or Ctrl + G
Select Special Cells
Select Blank Cells
Select OK
All of the blank cells should now be hightlighted
Now just paste the formula.
You may want to copy and paste special values the entire column to
permanenetly set the values...
 
Without a macro the easiest way would probably be something like this...

In Cell B2 add the formula =B1 + 1
Copy Cell B2
Highlight the entire area of Column B where you want to add the numbers
(like B1:B100)
Select F5 or Ctrl + G
Select Special Cells
Select Blank Cells
Select OK
All of the blank cells should now be hightlighted
Now just paste the formula.
You may want to copy and paste special values the entire column to
permanenetly set the values...

Jim,

That is awesome. Worked exactly as I needed.

Thank you for saving me so much time....I have 10,000 lines in my
spreadsheet!

Louise
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top