Number Sequence problem

jimmyglass

New Member
Joined
Aug 23, 2007
Messages
3
Hi,
I have a problem which I cant find the answer too looking through the old posts.

The data I am dealing with is for bills of materials for various products;
along the lines of - [Part number; Sequence No; Operation: Material; Qty] in separate columns.

I have created a macro which deletes rows from the structure if the Qty column is equal to zero.

My problem is that after the rows that arent needed have been deleted, the sequence column is no longer correct as numbers in the sequence are missing. I need a way of them autocorrecting.

To complicate things there are a number of structures on one worksheet all following on from each other, and they are not always the same length, with each structure normally numbering between 5 and 25 rows.

The first row of each structure always contain 1 in the sequence column and is never deleted, and the last row in a structure always contains "Bookin" or "Stockin" in the operation column, so these could be used to define a range where the numbers in between have to be sequential.

I hope that makes sense!

I've tried using various formulas in the sequence column such as adding 1 to the cell above but this just results in #REF in the row below a deleted row.

Any help would be greatly appreciated!!

Jimmy

Forgot to mention I'm using Excel 97
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
How about this for the sequence column:
Code:
=INDIRECT(ADDRESS(ROW()-1,COLUMN()))+1
 
Upvote 0
Yeah that works! But unfortunately it merges two columns together? and so overwrites the data in column D.

Thanks for your help
 
Upvote 0
You said:
I've tried using various formulas in the sequence column such as adding 1 to the cell above but this just results in #REF in the row below a deleted row.
... so where did you try my formula? I thought you'd be putting it in the sequence column.

So what do you mean by "it merges two columns together"?
 
Upvote 0
I apologise, I've got it working now, I'm not sure what I did the first time!

Thanks for that, was a lot simpler than I thought it would be!

Jimmy
 
Upvote 0

Forum statistics

Threads
1,215,429
Messages
6,124,835
Members
449,192
Latest member
mcgeeaudrey

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