numbering rows/skipping rows with repeated entries

pairustwo

New Member
Joined
Sep 19, 2002
Messages
6
Hi All
I want to make a simple linear series fill, starting at 1, in column A.
The problem is that in column B, where I have a LONG list of names I'd like numbered, many of the names appear more than one time in a row and I want only one number assigned to a name; in the end I have the number of unique people who appear on the list and not the number of entries.

All people with mulitiple entries appear in contiguous rows, so John Smith is listed in B1 - B3 and Jane Doe is listed in B4 - B5. To clarify I am hoping that in A1(to the left of John Smith's first entry) will be labled "1" and A4 (to the left of Jane Doe's first entry) will be labled "2" while all other cells in the A column are left blank.

Thanks for your help
pairus
 
On 2002-09-21 19:35, pairustwo wrote:
I entered this Formula-
=IF(COUNTIF($B$1:B1,B2),"",MAX($A$1:A1)+1)
into A2 and then again into A3, A4, and so on. The results are that I get a 1 next to each name in B column. 1's all the way down.

Again I think than Aladan's formula needs to be changed for each row - see his original post. Am I wrong here?

OK guys feel free to let this one go if you'd like because I'm feeling like I need to go read an excel book instead of the quick and dirty - which was to ask you all.

Thanks for your help
Pairus

Enter the formula in A2 and copy down. When you copy down, the formula changes accordingly.

That's all you need.
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
You are right - Aladin's formula needs to change with each row.

So enter the formula in cell A2 and copy it down to the end of your list. That is, select cell A2 and choose Edit, Copy from the menu. Then select cells A3 to the cell in column A next to your last entry in column B and choose Edit, Paste from the menu.

Notice that the references in Aladin's formula are a mixture of absolute and relative. The relative references adjust when you copy and paste.
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,478
Members
448,967
Latest member
visheshkotha

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