Automatic numbering?

jassyphee

New Member
Joined
Jan 8, 2014
Messages
16
I was wondering how do you set automatic numbering through vba scripting for a column start from A5, for selected worksheets, so that when an entry beside it is made, the item is numbered? The number of entries vary. Thank you
 
Last edited:

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Jassyphee,

can you give us an example of a sheet and the number you have in them and what numbers you want when an entry is made. Should these numbers be randon, consecutive, from a list somewhere?

thx

FarmerScott
 
Upvote 0
Currently In column A I have the heading item number, and beside it in column B is the description (for example bonds). There are two things I want to accomplish. 1. I want to have the numbers automatically appear when the adjacent cell is occupied, so I used the formula =IF(B5<>"",COUNTA($B$5:B5) however, if I have a sheet with too many entries, this can be tedious/inefficient. That way I want it to automatically be filled. 2. I also want to figure out how to continue the numbering onto a next worksheet. Say, Sheet1 end item no. is 20, I want the next page to start from 21. which I used this formula =Max('Sheet1'!$A$#:A#). Is there someone to do this on macros? here's how the excel looks like:
28mlqnq.png
15g74ef.png
Jassyphee,

can you give us an example of a sheet and the number you have in them and what numbers you want when an entry is made. Should these numbers be randon, consecutive, from a list somewhere?

thx

FarmerScott
 
Upvote 0
Jassyphee,

thanks for the information.

A quick couple of questions-

1. when you put in a new line of data will you always start at Col B or anywhere in the row?
2. what will happen if you put data into sheet2 and you then have to insert a row or two into sheet 1? How/what do you want the item number/s to look like?

thx

FarmerScott
 
Upvote 0
No problem farmerscott. ; )
1. A new line of data will always start at B and the complete row will be completed.
2. When sheet one's number of line changes, I want sheet 2 to correspond accordingly, therefore, if sheet1 ends up with 22 lines instead of 20 lines, i want sheet2 to start numbering from 23. thanks for the help!
 
Upvote 0

Forum statistics

Threads
1,203,506
Messages
6,055,801
Members
444,825
Latest member
aggerdanny

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top