Numeric alpha sequence question

Phatcat67

New Member
Joined
Nov 2, 2017
Messages
1
Hello everyone!

I need to create a formula that will allow me to make a list in the following sequence:

PC8101A
PC8101B
PC8101C
PC8101D
PC8101E

Then repeating all the way to PC8100E

Is there a macro I can use for such?

The first two letters will never change, the last is always a single letter A to E and the numbers need to increase incrementally

Hopefully that makes sense...

Thanks!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Book1
A
1PC8101A
2PC8101B
3PC8101C
4PC8101D
5PC8101E
6PC8102A
7PC8102B
8PC8102C
9PC8102D
10PC8102E
11PC8103A
12PC8103B
13PC8103C
14PC8103D
15PC8103E
Sheet1
Cell Formulas
RangeFormula
A1="PC"&(INT((ROWS($A$1:$A1)-1)/5)+8101)&CHAR(65+MOD(ROWS($A$1:$A1)-1,5))


WBD
 
Upvote 0
Welcome to the board.

In A1 try:
Code:
="PC"&INT((ROW()-1)*0.2&(CHAR(65+MOD(ROW()-1,5)))
Then drag down
 
Last edited:
Upvote 0
Correction try:
Code:
="PC"&8101+INT((+ROW()-1)*0.2)&(CHAR(65+MOD(ROW()-1,5)))
(which is virtually same as WBD's suggestion)
 
Upvote 0
Yep. Same solution. Only thing to be aware of is that if the first row is anything other than row 1, our formulas produce different results. I've previously been chastised for using ROW() so I tend to use ROWS() now which doesn't have a direct dependency on the starting cell :)

WBD
 
Upvote 0
Agree, I went for simple and assumed it started in A1 without any other info, yours more flexible :)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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