Excel formula seq number

Pohguan

New Member
Joined
Dec 18, 2019
Messages
8
Office Version
  1. 2010
Platform
  1. Windows
HI

I have a listing like below, i need to convert this to a summary. If the unit number is in sequence, it will show start of number - end, if not just the number itself. Need to do this because the list is very long.
Is there a formula or technique that i'll be able to do this instead of manually?


Division Unit
A 1
A 2
A 3
A 4
B 5
A 6
B 7
B 8


Desire output
Division Unit
A 1-4, 6
B 5, 7-8
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hi,
In order to properly condense your strings, how is your Data structured ?
Are your "Division-Unit" located in one single cell for each Division, or each item is located in a dedicated cell ?
 
Upvote 0
Hi James,

Division and Unit is in different column, so each item has dedicated cell.

Hope this clarifies
 
Upvote 0
In my opinion, there is quite a number of steps to reach ... the starting line ... ;)
The first two steps could be :
1. Sort in ascending by Division and by Unit
2. Concatenate all Units with same Division in one cell
 
Upvote 0

Forum statistics

Threads
1,214,657
Messages
6,120,773
Members
448,991
Latest member
Hanakoro

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