Have the first number of a serial in one cell and the last serial in another cell, and have a sheet fill in the rest?

BAQI

New Member
Joined
Dec 2, 2022
Messages
40
Office Version
  1. 2016
Platform
  1. Windows
Example of what I'm looking for:

A2 = ABCDEF (an item that needs to be serialized)
B2 = 001 (the start serial)
C2 = 008 (the end serial)

A3 = UVWXYZ
B3 = 004
C3 = 011

Another sheet creates the following automatically:

A2 = ABCDEF
B2 = 001

A3 = ABCDEF
B3 = 002

A4 = ABCDEF
B4 = 003

.......

A9 = ABCDEF
B9 = 008

A10 = UVWXYZ
B10 = 004

A11 = UVWXYZ
B11 = 005

......

A17 = UVWXYZ
B17 = 011

I'm trying to keep one page clean, and save time by not having to do repetitive steps.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Have no familiarity with that software. Sorry.
If in another cell I do =TEXT($B2,"000") THAT shows up properly. How is =TEXT any different than:

Sheets("NewSerials").Range("B:B").NumberFormat = "###"

And is there a way to edit the .NumberFormat = "###" to be a text format instead?
 
Upvote 0
Will this accomplish what you want (adjust ref as needed):

Code:
Sub FmtNum()
Range("C10").NumberFormat = "@"
Range("C10") = Format(Range("B10"), "000")
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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