Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-17-2018, 12:12 PM
14spar15 14spar15 is offline Formula for number sequence Windows XP Formula for number sequence Office 2000
Advanced Beginner
Formula for number sequence
 
Join Date: Mar 2011
Posts: 97
14spar15 is on a distinguished road
Default Formula for number sequence

I had earlier posted this on the Excel forum someone suggested I try the Excel Programming forum.


I’m trying to find a formula to create a sequence of numbers. The starting number would be in A1 and the ending number in B1. So if A1 = 88 and B1= 93 the result in the formula cell (C1) would be 88 89 90 91 92 93. I tried using =Row(Indirect(A1”;”&B1)) and I could get the correct results. When I record the process for a Macro (which is what I really need) it at first seems to work but when I change A1 or B1 to another range it does not work. When I look at the recorded code I am getting this.

Sub Macro1()
Range("C1").Select
ActiveCell.FormulaR1C1 = "88;89;90;91;92;93"
End Sub


I tried changing it this and got an error


Sub Macro1()
Range("C1").Select
ActiveCell.FormulaR1C1 = "ROW(INDIRECT(A1&":"&B1))"
End Sub

This was when I was thinking just a simple formula where there is a A1 +1 loop until the results equal B1 then break loop might be easier but it seems like this is way beyond my capabilities also and the formula is not so simple.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula for number sequence Create a sequence of numbers using a formula 14spar15 Excel Programming 9 03-19-2018 01:15 AM
Formula Assistance for restricting the number of for analysis gspikesr Excel 3 05-02-2016 11:28 PM
Formula for number sequence Need an excel formula to remove dashes in a number sequence jyfuller Excel Programming 3 02-27-2013 10:32 PM
Formula for number sequence Formula to add number of pallets shipped piglovindillard Excel 2 08-13-2012 06:40 AM
Formula for number sequence Excel sheet Sequence Number belloffice Excel 1 02-25-2010 02:41 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:12 AM.


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