Create a grouping using A,B,C etc

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,368
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
As you can see, in column B I found a formula to number the groupings of column A. Not sure if this is the most efficient formula to use, but I would also like to create a grouping of column A, but by letter versus the numbering.

Groupings.xlsb
ABC
1NameNumberLetter
2Apr1A
3Apr1A
4Apr1A
5Aug2B
6Aug2B
7Aug2B
8Aug2B
9Aug2B
10Dec3C
11Dec3C
12Feb4D
13Feb4D
14Feb4D
15Feb4D
16Jan5E
17Jan5E
18Jan5E
Sheet1
Cell Formulas
RangeFormula
B2:B18B2=IF(COUNTIF(A$2:A2,A2)=1,MAX(B$1:B1)+1,VLOOKUP(A2,A$1:B1,2,0))
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Book1
ABCD
1NameNumberLetter1Letter2
2Apr1AA
3Apr1AA
4Apr1AA
5Aug2BB
6Aug2BB
7Aug2BB
8Aug2BB
9Aug2BB
10Dec3CC
11Dec3CC
12Feb4DD
13Feb4DD
14Feb4DD
15Feb4DD
16Jan5EE
17Jan5EE
18Jan5EE
19
Sheet1
Cell Formulas
RangeFormula
B2:B18B2=IF(COUNTIF(A$2:A2,A2)=1,MAX(B$1:B1)+1,VLOOKUP(A2,A$1:B1,2,0))
C2:C18C2=IF(ROW()<>2, IF(A2=A1,C1,CHAR(CODE(C1)+1)),"A")
D2:D18D2=CHAR(64+B2)
 
Upvote 0
A couple other options:

Book1
ABC
1NameNumberLetter
2Apr1A
3Apr1A
4Apr1A
5Aug2B
6Aug2B
7Aug2B
8Aug2B
9Aug2B
10Dec3C
11Dec3C
12Feb4D
13Feb4D
14Feb4D
15Feb4D
16Jan5E
17Jan5E
18Jan5E
Sheet2
Cell Formulas
RangeFormula
B2:B18B2=N(B1)+(A2<>A1)
C2:C18C2=SUBSTITUTE(ADDRESS(1,SUMPRODUCT(--($A$1:$A1<>$A$2:$A2)),4),1,"")
 
Upvote 0
Solution
Thank you for the help. Both of these solutions work great.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
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