ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sequential numbering (https://www.excelbanter.com/excel-programming/433950-sequential-numbering.html)

Jock

Sequential numbering
 
What would be the best method to add the next sequential number to column D
when a date is entered in F on the same row? This number must never change
Problems arise when whole rows are removed and the data pasted on another
sheet (historical data) when using something like this:
=IF($F6="","",(MAX($D$4:$D5,complete!G:G,'struck
out'!D:D,stayed!D:D,withdrawn!D:D)+1))
This formula checks the active page and four other sheets for the highest
number and works fine until a row is removed to another sheet.
Is there a code method which will add sequential numbers and not be affected
by removing whole rows of data?
Thank you.
--
Traa Dy Liooar

Jock

Jacob Skaria

Sequential numbering
 
I am unable to recreate the issue you were mentioning..Try with the below
formula.

=IF(INDIRECT("F6")="","",MAX(INDIRECT("D4:D5"),IND IRECT("complete!G:G"),INDIRECT("'struck out'!D:D"),INDIRECT("stayed!D:D"),INDIRECT("withdr awn!D:D"))+1)

If this post helps click Yes
---------------
Jacob Skaria


"Jock" wrote:

What would be the best method to add the next sequential number to column D
when a date is entered in F on the same row? This number must never change
Problems arise when whole rows are removed and the data pasted on another
sheet (historical data) when using something like this:
=IF($F6="","",(MAX($D$4:$D5,complete!G:G,'struck
out'!D:D,stayed!D:D,withdrawn!D:D)+1))
This formula checks the active page and four other sheets for the highest
number and works fine until a row is removed to another sheet.
Is there a code method which will add sequential numbers and not be affected
by removing whole rows of data?
Thank you.
--
Traa Dy Liooar

Jock


Jock

Sequential numbering
 
Hi jacob,
This gives the same result for me.
I don't think a formula is the answer in this case. I have abandoned the
idea of automatic numbering in this instance.

Thanks though
--
Traa Dy Liooar

Jock


"Jacob Skaria" wrote:

I am unable to recreate the issue you were mentioning..Try with the below
formula.

=IF(INDIRECT("F6")="","",MAX(INDIRECT("D4:D5"),IND IRECT("complete!G:G"),INDIRECT("'struck out'!D:D"),INDIRECT("stayed!D:D"),INDIRECT("withdr awn!D:D"))+1)

If this post helps click Yes
---------------
Jacob Skaria


"Jock" wrote:

What would be the best method to add the next sequential number to column D
when a date is entered in F on the same row? This number must never change
Problems arise when whole rows are removed and the data pasted on another
sheet (historical data) when using something like this:
=IF($F6="","",(MAX($D$4:$D5,complete!G:G,'struck
out'!D:D,stayed!D:D,withdrawn!D:D)+1))
This formula checks the active page and four other sheets for the highest
number and works fine until a row is removed to another sheet.
Is there a code method which will add sequential numbers and not be affected
by removing whole rows of data?
Thank you.
--
Traa Dy Liooar

Jock



All times are GMT +1. The time now is 11:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com