Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I've got a cell that represents a sequence of numbers like p129-132 and would
like to list each number seperately: p129,p130,p131,p132. TIA |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Select the cells containing the data and run:
Sub ListMaker() Dim n1 As Integer, n2 As Integer Dim v As String For Each r In Selection s = Split(r.Value, "-") n2 = s(1) n1 = Right(s(0), Len(s(0)) - 1) + 1 v = s(0) For i = n1 To n2 v = v & "," & i Next r.Value = v Next End Sub -- Gary''s Student - gsnu200769 "Willy Wonka" wrote: I've got a cell that represents a sequence of numbers like p129-132 and would like to list each number seperately: p129,p130,p131,p132. TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Extract number between a dash | Excel Discussion (Misc queries) | |||
How to find & replace a formula sequence with * in it? | Excel Discussion (Misc queries) | |||
Replacing dash in item number | Excel Discussion (Misc queries) | |||
Replace Error with a Dash | Excel Worksheet Functions | |||
understanding dash dash in a excel formula | Excel Worksheet Functions |