Increment duplicate IDs by a dash + 1

Status
Not open for further replies.

TheHack22

Board Regular
Joined
Feb 3, 2021
Messages
121
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
Hi VBA Gurus,

I hope everyone is doing well. I have this list of Customer IDs and the number of payments for this check run.
It's company practice to increment the IDs by -1(Manually), adding one each time, while doing nothing with the first ID instance. Please see the small example below.

Is there a way to make this a repeatable process Power Query, or any other methods?

IDSDesired New IDs
Imr2022581Imr2022581
Imr2022581Imr2022581-1
Imr2022817Imr2022817
Imr2022817Imr2022817-1
Imr2022986Imr2022986
Imr2022986Imr2022986-1
Imr2022321Imr2022321
Imr2022321Imr2022321-1
Imr2022321Imr2022321-2
Imr2022878Imr2022878
Imr2022878Imr2022878-1
Imr2022878Imr2022878-2

Thanks
Imran
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Status
Not open for further replies.

Forum statistics

Threads
1,224,823
Messages
6,181,173
Members
453,021
Latest member
Justyna P

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