Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Created automatically sequence numbers

How can I create an automatically sequernce numbers?.
The program I have create an automatically database from the column "B" to
column "N". However, everytime I have the data written I have to type the
serial number on the correspond column "A". I wonder if I can add a statement
to write automatically the serial number in the column "A". This number will
start from 7047.001 so next one will be 7048.001, 7049.001 and so on.

Thanks in advance.
Maperalia
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Created automatically sequence numbers

This page is considered to be the best on the subject
http://www.mcgimpsey.com/excel/udfs/sequentialnums.html

Mike

"maperalia" wrote:

How can I create an automatically sequernce numbers?.
The program I have create an automatically database from the column "B" to
column "N". However, everytime I have the data written I have to type the
serial number on the correspond column "A". I wonder if I can add a statement
to write automatically the serial number in the column "A". This number will
start from 7047.001 so next one will be 7048.001, 7049.001 and so on.

Thanks in advance.
Maperalia

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Created automatically sequence numbers

Sub AddNumbers()
Dim i as Long, j as long
i = 2
j = 7047
do while cells(i,2) < ""
cells(i,1) = j + .001
j = j + 1
i = i + 1
Loop
End Sub

--
Regards,
Tom Ogilvy


"maperalia" wrote:

How can I create an automatically sequernce numbers?.
The program I have create an automatically database from the column "B" to
column "N". However, everytime I have the data written I have to type the
serial number on the correspond column "A". I wonder if I can add a statement
to write automatically the serial number in the column "A". This number will
start from 7047.001 so next one will be 7048.001, 7049.001 and so on.

Thanks in advance.
Maperalia

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Created automatically sequence numbers

Tom;
Thnaks for your quick response.
I typed the 7047.001 in the cell "A1" and run the macro and it is doing
nothing. Do I missing something?

Maperalia

"Tom Ogilvy" wrote:

Sub AddNumbers()
Dim i as Long, j as long
i = 2
j = 7047
do while cells(i,2) < ""
cells(i,1) = j + .001
j = j + 1
i = i + 1
Loop
End Sub

--
Regards,
Tom Ogilvy


"maperalia" wrote:

How can I create an automatically sequernce numbers?.
The program I have create an automatically database from the column "B" to
column "N". However, everytime I have the data written I have to type the
serial number on the correspond column "A". I wonder if I can add a statement
to write automatically the serial number in the column "A". This number will
start from 7047.001 so next one will be 7048.001, 7049.001 and so on.

Thanks in advance.
Maperalia

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Created automatically sequence numbers

Tom explained in an earlier post that i = 2 means A2

If you want A1 to be included change the 2 to 1


Gord Dibben MS Excel MVP

On Thu, 14 Jun 2007 14:15:00 -0700, maperalia
wrote:

Tom;
Thnaks for your quick response.
I typed the 7047.001 in the cell "A1" and run the macro and it is doing
nothing. Do I missing something?

Maperalia

"Tom Ogilvy" wrote:

Sub AddNumbers()
Dim i as Long, j as long
i = 2
j = 7047
do while cells(i,2) < ""
cells(i,1) = j + .001
j = j + 1
i = i + 1
Loop
End Sub

--
Regards,
Tom Ogilvy


"maperalia" wrote:

How can I create an automatically sequernce numbers?.
The program I have create an automatically database from the column "B" to
column "N". However, everytime I have the data written I have to type the
serial number on the correspond column "A". I wonder if I can add a statement
to write automatically the serial number in the column "A". This number will
start from 7047.001 so next one will be 7048.001, 7049.001 and so on.

Thanks in advance.
Maperalia




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Created automatically sequence numbers

In addition, you don't have to type any number in column A

The line j = 7047 takes care of that.

But you do need data in column B


Gord

On Thu, 14 Jun 2007 14:43:58 -0700, Gord Dibben <gorddibbATshawDOTca wrote:

Tom explained in an earlier post that i = 2 means A2

If you want A1 to be included change the 2 to 1


Gord Dibben MS Excel MVP

On Thu, 14 Jun 2007 14:15:00 -0700, maperalia
wrote:

Tom;
Thnaks for your quick response.
I typed the 7047.001 in the cell "A1" and run the macro and it is doing
nothing. Do I missing something?

Maperalia

"Tom Ogilvy" wrote:

Sub AddNumbers()
Dim i as Long, j as long
i = 2
j = 7047
do while cells(i,2) < ""
cells(i,1) = j + .001
j = j + 1
i = i + 1
Loop
End Sub

--
Regards,
Tom Ogilvy


"maperalia" wrote:

How can I create an automatically sequernce numbers?.
The program I have create an automatically database from the column "B" to
column "N". However, everytime I have the data written I have to type the
serial number on the correspond column "A". I wonder if I can add a statement
to write automatically the serial number in the column "A". This number will
start from 7047.001 so next one will be 7048.001, 7049.001 and so on.

Thanks in advance.
Maperalia


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Created automatically sequence numbers

Tom;
Thanks very much. It is working PERFECTLY!!!

"Tom Ogilvy" wrote:

Sub AddNumbers()
Dim i as Long, j as long
i = 2
j = 7047
do while cells(i,2) < ""
cells(i,1) = j + .001
j = j + 1
i = i + 1
Loop
End Sub

--
Regards,
Tom Ogilvy


"maperalia" wrote:

How can I create an automatically sequernce numbers?.
The program I have create an automatically database from the column "B" to
column "N". However, everytime I have the data written I have to type the
serial number on the correspond column "A". I wonder if I can add a statement
to write automatically the serial number in the column "A". This number will
start from 7047.001 so next one will be 7048.001, 7049.001 and so on.

Thanks in advance.
Maperalia

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Created automatically sequence numbers

Gord;
Thanks very much. It is working PERFECTLY!!!

Maperalia



"Gord Dibben" wrote:

In addition, you don't have to type any number in column A

The line j = 7047 takes care of that.

But you do need data in column B


Gord

On Thu, 14 Jun 2007 14:43:58 -0700, Gord Dibben <gorddibbATshawDOTca wrote:

Tom explained in an earlier post that i = 2 means A2

If you want A1 to be included change the 2 to 1


Gord Dibben MS Excel MVP

On Thu, 14 Jun 2007 14:15:00 -0700, maperalia
wrote:

Tom;
Thnaks for your quick response.
I typed the 7047.001 in the cell "A1" and run the macro and it is doing
nothing. Do I missing something?

Maperalia

"Tom Ogilvy" wrote:

Sub AddNumbers()
Dim i as Long, j as long
i = 2
j = 7047
do while cells(i,2) < ""
cells(i,1) = j + .001
j = j + 1
i = i + 1
Loop
End Sub

--
Regards,
Tom Ogilvy


"maperalia" wrote:

How can I create an automatically sequernce numbers?.
The program I have create an automatically database from the column "B" to
column "N". However, everytime I have the data written I have to type the
serial number on the correspond column "A". I wonder if I can add a statement
to write automatically the serial number in the column "A". This number will
start from 7047.001 so next one will be 7048.001, 7049.001 and so on.

Thanks in advance.
Maperalia



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
Invoice Numbers created automatically srctr Excel Discussion (Misc queries) 2 April 15th 09 04:26 PM
automatically Add numbered rows in sequence from a given number Six Sigma Blackbelt Excel Worksheet Functions 5 September 4th 08 03:17 PM
how do I automatically sequence the month Rubber 4 u Excel Worksheet Functions 4 February 6th 07 05:38 PM
How do I automatically populate a Pareto chart in sequence? Lear 6 sigma Guy Excel Programming 1 March 15th 06 04:59 PM
Panes sequence. Pane Index 2 & 3 depend on how panes are created keepITcool Excel Programming 0 August 17th 05 12:18 PM


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