Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Assign number to groups of same numbers

Hi,

Heres the situation.

In Excel I have:

1st column: Thousands of store numbers.
2nd column: I manually created something called Master Corp ID

The Problem:
1st Column has approx. 29,500 store numbers but theyre all not unique. Some
stores can have the same store number because theyre all the same type of
store i.e Circuit City, Best Buy, also, not all Circuit, Best Buy will not
have the same unique number due to type of store it is/area and et cetera.
In-addition, I also have a ton of mom and pop shops with their unique store
numbers.

What I Need Please:
I need a way to in column 2 to automatically assign numbers for each group
of store numbers so for example:

Store Number Master --- Corp ID
2205 1
2205 1
2205 1
2205 1
3566 2
4523 3
5545 4
5545 4
6001 5
6001 5
6001 5

Can someone please help me?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Assign number to groups of same numbers


We would need more info such as: do you want this an automatic and
ongoing agenda or a one time deal?

Here's the semi-long way for a one time deal:

Select all of column A including Header and create a pivot table. This
is the easiest way to get avoid duplicates. From the pivot, copy the
list into a new sheet. Number your list using autofill. 1 for first
row, 2 for second, etc.

Now go back to your column B and put in a VLOOKUP function based off of
this new sheet.

If you're looking for something more dynamic, you're gonna need a macro
I believe.


--
pikapika13
------------------------------------------------------------------------
pikapika13's Profile: http://www.excelforum.com/member.php...o&userid=10892
View this thread: http://www.excelforum.com/showthread...hreadid=570868

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Assign number to groups of same numbers

If the first columns numbers are grouped together, assuming column 1 is 'A'
and column 2 is 'B' and Row 1 is your column headings, you would need to type
a 1 in 'B2' to give a starting reference. Then place this formula in 'B3' and
copy it all the way down your spreadsheet:
=If(A2=A3,B2+1,B2)

This will compare column 1's value to the cell above it, if it's the same it
will leave the value in column 2 the same as it was. If the value is
different it will increase the value in column 2 by 1.

Hope this helps.

"mike" wrote:

Hi,

Heres the situation.

In Excel I have:

1st column: Thousands of store numbers.
2nd column: I manually created something called Master Corp ID

The Problem:
1st Column has approx. 29,500 store numbers but theyre all not unique. Some
stores can have the same store number because theyre all the same type of
store i.e Circuit City, Best Buy, also, not all Circuit, Best Buy will not
have the same unique number due to type of store it is/area and et cetera.
In-addition, I also have a ton of mom and pop shops with their unique store
numbers.

What I Need Please:
I need a way to in column 2 to automatically assign numbers for each group
of store numbers so for example:

Store Number Master --- Corp ID
2205 1
2205 1
2205 1
2205 1
3566 2
4523 3
5545 4
5545 4
6001 5
6001 5
6001 5

Can someone please help me?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
Why are 1/2 my numbers imported as text and the rest as numbers? KBear Excel Discussion (Misc queries) 2 April 21st 06 01:40 PM
Assign one number to a number range Sue New Users to Excel 1 October 6th 05 01:21 AM
2 questions - DB and number groups Rodney New Users to Excel 1 April 8th 05 12:44 PM
How do i change numbers in text format to number format? Greg New Users to Excel 1 December 14th 04 05:22 PM


All times are GMT +1. The time now is 09:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"