How to go about getting the following result?

Chrisa1956

New Member
Joined
Feb 27, 2017
Messages
5
Hello All,

I have a customer list with addresses attached to a customer number. What I need to do is give each address associated with a customer it's own code start with 51 and then go on incremental by one until the next customer.

So if the customer has one address to the customer number, the code would be 51. If two addresses per customer, then I would get 51 & 52. So on and so on for as many addresses exist. The largest customer has 772 addresses.

See example below. Let me know if I don't make any sense.

Customer #CodeStreetCityStateZip Code
11111​
51​
203 Pearl StReesevilleWest Virginia
53579​
11111​
52​
4343 W Glendale AveGlendaleArkansas
85301​
22222​
51​
12678 Dix Toledo RdSouthgateMichigan
48195​
33333​
51​
601 Fulton AveSacramentoCalifornia
95825​
33333​
52​
5443 E La Palma AveAnaheimCalifornia
92807​
33333​
53​
518 Capitol Way SOlympiaWashington
98501​
33333​
54​
10865 W Indian School RdAvondaleArkansas
85392​
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi, the formula for B2:
=IF(A2=A1,B1+1,51)
2. step: AutoFill down
 
Upvote 0
Solution

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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