Next Number In Sequence?

Elliot46

New Member
Joined
Dec 19, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi All,

New here and new to excel really... I had a question & don't know if it is something easily solved.

Below is a screen grab of a work drawing list with drawing numbers as per below example... D0001, D0002, D0003 etc.

Is there anyway to get the cell below (Next Drawing No.) to automatically update with the next number in the sequence, after D0003 respectively is entered into a cell? Taking into consideration that previous numbers
will be entered frequently with letters a, b, c etc behind them for drawing revisions.

Sequence.jpg


Thank you for any help in advance.

Regards,
Elliot
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Assuming your data is in column D:
Excel Formula:
="D"&TEXT(RIGHT(LOOKUP(2,1/(D:D<>""),D:D), LEN(LOOKUP(2,1/(D:D<>""),D:D))-1)+1,"0000")
Or
Excel Formula:
=TEXT(RIGHT(LOOKUP(2,1/(D:D<>""),D:D), LEN(LOOKUP(2,1/(D:D<>""),D:D))-1)+1,"D0000")
I haven't tested the second one.
 
Upvote 0
Hi & Welcome to MrExcel.

Something like?

Book7
AB
1
2Next Drawing No.
3D0004
4
5Drawing No
6D0001
7D0002
8D0003
9
10
11
12
13
Sheet2
Cell Formulas
RangeFormula
A3A3="D000"&COUNTIF($A$6:$A$13,"*")+1
 
Upvote 0
Hi & Welcome to MrExcel.

Something like?

Book7
AB
1
2Next Drawing No.
3D0004
4
5Drawing No
6D0001
7D0002
8D0003
9
10
11
12
13
Sheet2
Cell Formulas
RangeFormula
A3A3="D000"&COUNTIF($A$6:$A$13,"*")+1
This will cause the number displayed like D00010 with excess leading zeros after larger numbers.
 
Upvote 0
This will cause the number displayed like D00010 with excess leading zeros after larger numbers.

Then how about

Book7
AB
1
2Next Drawing No.
3D0014
4
5Drawing No
6D0001
7D0002
8D0003
9D0004
10D0005
11D0006
12D0007
13D0008
14D0009
15D0010
16D0011
17D0012
18D0013
19
Sheet2
Cell Formulas
RangeFormula
A3A3="D"&TEXT(COUNTIF($A$6:$A$22,"*")+1,"0000")



Anyways you provided a great formula, it is updating based on last number entered.
 
Upvote 0
Then how about

Book7
AB
1
2Next Drawing No.
3D0014
4
5Drawing No
6D0001
7D0002
8D0003
9D0004
10D0005
11D0006
12D0007
13D0008
14D0009
15D0010
16D0011
17D0012
18D0013
19
Sheet2
Cell Formulas
RangeFormula
A3A3="D"&TEXT(COUNTIF($A$6:$A$22,"*")+1,"0000")



Anyways you provided a great formula, it is updating based on last number entered.
Yes, if the numbers increase squentially, then your suggestion is better.
 
Upvote 0
Gotta say, the number of good responses shows not just how flexible Excel is, but also how valuable this board is!
Here's a solution you can copy down the entire column, and the appropriate Drawing No. when Drawn By is entered (must be in sequence).
Book1
AB
1Drawing No.Drawn By
2D0001Kian
3D0002Peyton
4D0003Sophia
5D0004Poppy
6D0005Talon
7D0006Damon
8D0007Sebastian
9D0008Janessa
10D0009Jarvis
11D0010Jayla
12D0011Micah
13 
14#VALUE!Who?
Sheet1
Cell Formulas
RangeFormula
A2A2="D"&TEXT(1,"000#")
A3:A14A3=IF(B3<>"","D"&TEXT(NUMBERVALUE(RIGHT(A2,4)+1),"000#"),"")
I included Row 14 to show it's not infallible! Cell A2 can also just contain "D0001". Used the TEXT function just to illustrate its output.
 
Upvote 0
Good afternoon all,

Thank you for your responses, all very much appreciated. I am a complete novice when it comes to this.

So my drawing No. data is in column B. It will have older / previous numbers in there quite frequently... is this a spanner in the works in terms of a formula being able to keep track of the drawing number sequence?

Odd Sequence.jpg


Regards,
Elliot
 
Upvote 0
I haven't tested. Hope it works:
Excel Formula:
=LET(n,RIGHT(LOOKUP(2,1/(B:B<>""),B:B),TEXT(IF(ISNUMBER(n,1)*1),RIGHT(n, LEN(n)-1),MID(n, 2, LEN(n)-2))+1,"D0000")
 
Last edited by a moderator:
Upvote 0
You could use something like:

Excel Formula:
=TEXT(MAX(MID(B19:B27,2,4)+0)+1,"\D0000")

assuming no blank cells within the data range.
 
Upvote 0

Forum statistics

Threads
1,215,528
Messages
6,125,342
Members
449,218
Latest member
Excel Master

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