Help

Formula to Condense a Series of Numbers with hyphens

Topic Labels: Formulas
Solved
Jump to Solution
3614 11
cancel
Showing results for 
Search instead for 
Did you mean: 
Paul_Warren
8 - Airtable Astronomer
8 - Airtable Astronomer

I am looking to take a long string of comma separated numbers (it is a string from a look up). Here is an example of numbers to summarize:

1.17-01, 1.17-02, 1.17-03, 1.17-04, 1.17-05, 1.17-06, 1.17-07, 1.17-08, 1.17-09, 1.17-10, 1.17-11, 1.17-12, 1.17-13, 1.17-14, 1.17-17, 1.17-18, 1.33-01, 1.33-02, 1.33-03, 1.33-04, 1.33-05, 1.33-07, 1.33-08, 1.33-09, 1.33-10, 1.33-11, 1.33-12, 1.33-13, 1.33-14, 1.33-15, 1.33-16, 1.33-17

If you look closely, there are missing numbers. I am hoping to find a formula that will output:
1.17-01 --> 1.17-14, 1.17-17, 1.17-18, 1.33-01, --> 1.33-05, 1.33-07, --> 1.33-17

I am flexible on the “–>”, but as you can see a simple dash won’t work, because dashes exist in the numbers. Has anyone seen something like this before? Any help would be greatly appreciated!!

11 Replies 11
Paul_Warren
8 - Airtable Astronomer
8 - Airtable Astronomer

Actually, I found a way to do this with a simple formula:
LEFT(
SUBSTITUTE(
{Input Components Condensed},
‘\n’,
', ’
),
LEN(SUBSTITUTE(
{Input Components Condensed},
‘\n’,
', ’
)
)-2
)

Thanks!

You’re welcome and non taken. This is the world of fluid requirements because often we don’t know what’s possible.

But it also underscores the need for detailed requirements; we all agree they are beneficial, but the time it takes to think through all of the nuances is typically where developers and domain experts lunge forward without a clear pathway and outcome in mind.