Incremental numbers in one cell || Office 2016

arjun5ne

New Member
Joined
Jul 24, 2023
Messages
4
Office Version
  1. 2013
  2. 2011
Platform
  1. Windows
Dear Team,

I need help on excel formula how to display incremental numbers in one cell.

Example: 7 increment i.e. 7 14 21 28 35 42 49 56 63 70 - - - - - -

but in one cell display till 49 number only i.e. i need to use CONCATENATE till 49
 
A little more compact...
VBA Code:
Function Steps(StartNo As Long, EndNo As Long, Jump As Long) As String
  Dim X As Long, S As String
  For X = StartNo To EndNo Step Jump
    S = S & " " & X
  Next
  Steps = Trim(S)
End Function
Very nice Rick!
 
Upvote 0

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
You're welcome. Hope you got something that was useful. :)

BTW, what is the issue regarding versions?

Also BTW, another UDF option

VBA Code:
Function Steps(StartNo As Long, EndNo As Long, Jump As Long) As String
  Steps = Join(Filter(Application.Transpose(Evaluate(Replace(Replace("if(mod(row(#:^)-#," & Jump & ")=0,row(#:^),""x"")", "#", StartNo), "^", EndNo))), "x", False))
End Function
Also very nice Peter!
 
Upvote 0

Forum statistics

Threads
1,215,356
Messages
6,124,475
Members
449,164
Latest member
Monchichi

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