Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 04-13-2023, 01:55 PM
p45cal's Avatar
p45cal p45cal is offline Sequence numbers with Excel 2010 Windows 10 Sequence numbers with Excel 2010 Office 2019
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Quite surpries you want this in one cell.
In the attached formula in cell D2:
=InCellSeq(A1,B1)
supported by UDF:
Code:
Function InCellSeq(Start, Finish)
For I = Start To Finish
  myStr = Join(Array(myStr, I))
Next I
InCellSeq = Application.Trim(myStr)
End Function
There's also another UDF used in cell(s) K2:R2 which uses this UDF, stolen from : UDF for sequence function | MrExcel Message Board ):
Code:
Function ArrSeq(lRows As Long, Optional lCols As Long = 1, Optional lStart As Long = 1, Optional lStep As Long = 1) As Variant
Dim R As Long, C As Long, Nums As Long
Nums = lStart
For R = 1 To lRows
  For C = 1 To lCols
    ArrSeq = ArrSeq & "," & Nums
    Nums = Nums + lStep
  Next
  ArrSeq = ArrSeq & ";"
Next
ArrSeq = Evaluate("{" & Replace(Mid(Left(ArrSeq, Len(ArrSeq) - 1), 2), ";,", ";") & "}")
End Function
Attached Files
File Type: xlsm msofficeforums50737.xlsm (18.2 KB, 4 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How-To? Daily Data / Repeating Day Sequence in Excel 2010 jomar Excel 1 02-12-2019 03:30 AM
Sequence numbers with Excel 2010 Create a sequence of numbers using a formula 14spar15 Excel Programming 9 03-19-2018 01:15 AM
Sequence numbers after each print MauricioPillon Excel 0 02-15-2018 08:11 AM
Sequence numbers with Excel 2010 Wildcards - Sequence of Numbers at the Beginning of Each Paragraph qubie Word 1 11-30-2017 02:03 PM
Need Help Deleting Numbers in Hour Format and Numbers in Sequence rsrasc Word VBA 1 10-12-2016 02:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:21 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft