Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Numbering - Starting Over Based on Zero

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Numbering - Starting Over Based on Zero

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...
--
HTH...

Jim Thomlinson


" wrote:

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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Numbering - Starting Over Based on Zero

On May 28, 11:34 am, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com wrote:
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...
--
HTH...

Jim Thomlinson

" wrote:
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


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

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
Numbering pages, starting at a particular number Jammings Excel Discussion (Misc queries) 4 September 18th 09 03:17 PM
Starting Auto_Close macro based on an IF statement questor Excel Discussion (Misc queries) 4 February 25th 08 10:22 PM
Page Numbering starting on 3 Lynn Excel Discussion (Misc queries) 4 May 10th 06 09:26 PM
How can I assign a range starting cell based on a variable locati. feman007 Excel Worksheet Functions 3 March 9th 05 11:40 PM
Starting a macro based on cell value Le_requin Excel Programming 1 September 29th 04 03:16 PM


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