View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
WindsurferLA WindsurferLA is offline
external usenet poster
 
Posts: 30
Default sequential numbering

There are two approaches depending on how many times the operation needs
to be performed.

If you need to check many sheets over and over again, then the best way
is a macro. (see below). If you're just dealing with a one-time work
sheet, merely temporarily insert an additional column with a test such as:

=IF(B5=B6,1,0)

Then use a copy + paste special to replace the formulas with the values
generated by the formulas, and finally a sort on those values to group
together the redundant rows so they can be deleted.


Macro design for repetitive applications

It seems to me that you need to construct a macro to step through each
cell (in the column) and when at each cell, to compare the contents of
that cell with the contents of the cell below. If the contents are the
two cells are the same, then the macro needs to delete the redundant row.

If you can't find an example of a macro for stepping through the cells
of a worksheet or to determine the last active cell in the column of the
worksheet, post another inquiry and someone will point you to the
appropriate references.

WindsurferLA

super wrote:
I have an excel sheet with in the first column A

01.
01.01
01.02
01.03
01.03.01
01.03.02
02.
02.01

etc....

I need a way to somehow check if the sequence is always upcounting like
for example if there's somewhere an error like

02.01
02.01

or 02.01, 02.03 this will be corrected by a formula or macro or...
whatever, just a way to correct this

note: also the format has to stay xx.xx.xx.xx