Converting sequential numbers in one column to ranges in two columns

Hpotter73

New Member
Joined
Sep 21, 2019
Messages
5
Hi,
I have sequential numbers below in column A of excel.
M66.211
M66.212
M66.213
M66.214
M66.215
M66.216
M66.217
M66.218
M66.219
M66.811
M66.812
M66.813
M66.814
M66.815
M66.816
M66.817
M66.823
M66.824
M66.825
M66.826
M66.827
M66.828
M66.829
M66.830
<colgroup><col width="72" style="width: 54pt;"> <tbody> </tbody>

I want to covert this into
M66.211M66.219
M66.811M66.817
M66.823M66.830
<colgroup><col width="72" style="width: 54pt;" span="2"> <tbody> </tbody>

Is there a macro that can help with this

Thank you
<colgroup><col width="72" style="width: 54pt;" span="2"> <tbody> </tbody>
 
BTW, were you still a little verbose with your previous code? :p
That is, wouldn't this have done?
You know me, I always like to post long code procedures. :eek: Originally, I was going to try and approach the solution differently and when it didn't work out as I had hoped, I carved up the code I had and what I posted was the result (looks like I should have just thrown it away and started over again).



That is, wouldn't this have done?
Yes, of course... but you already knew that.
 
Last edited:
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi
Yes I had both codes with numbers and with alphabets in the data. I filtered the data just to include numbers and both the macros from Peter and Rick worked.
Thank you very much. I will find different way to call out other codes for the data base table. Appreciate all your help.
 
Upvote 0

Forum statistics

Threads
1,214,518
Messages
6,119,988
Members
448,935
Latest member
ijat

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