View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default replace - with missing numbers (e.g 1-4 = 1, 2,3,4)

Hi,

Am Mon, 7 May 2018 13:03:21 -0700 (PDT) schrieb jlclyde:

Hello, I am hoping that you can help me with a formula to replace a dash with the missing numbers. If I have 1-4 I would like to return 1,2,3,4.


in Excel 365 you could use:

=TEXTJOIN(", ",1,1*ROW(INDIRECT(LEFT(A1,FIND("-",A1)-1)&":"&MID(A1,FIND("-",A1)+1,99))))
and insert this formula with CTRL+Shift+Enter


Regards
Claus B.
--
Windows10
Office 2016