give the row number depending on a group number

mark692

Active Member
Joined
Feb 27, 2015
Messages
306
Office Version
  1. 2016
Platform
  1. Windows
i have 2 column, first column is where the group number is located the 2nd is where I want to put a formula thaw will give me the row number of the given number on the first column (example below). Is this possible? thanks :)

Book1
ABC
1nameGroupRow number per group
211
312
413
514
621
722
823
924
1031
1132
1233
1334
1435
1541
1642
1743
1844
Sheet1
 

Some videos you may like

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499
nameGroupnameGroupRPG
111
112
113
114
221
222
223
224
331
332
333
334
335
441
442
443
444

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Group = Table.Group(Source, {"name", "Group"}, {{"Count", each Table.RowCount(_), type number}}),
    List = Table.AddColumn(Group, "RPG", each {1..[Count]}),
    Expand = Table.ExpandListColumn(List, "RPG"),
    RC = Table.RemoveColumns(Expand,{"Count"})
in
    RC
 

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499
or
Book2
BCD
2nameGroupRPG
311
412
513
614
721
822
923
1024
1131
1232
1333
1434
1535
1641
1742
1843
1944
Sheet1
Cell Formulas
RangeFormula
D3:D19D3=COUNTIF(C$3:C3,C3)
 

Watch MrExcel Video

Forum statistics

Threads
1,122,295
Messages
5,595,294
Members
413,984
Latest member
stikpet

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
Top