Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-16-2021, 12:30 AM
14spar15 14spar15 is offline Formula to fill in sequence Windows 7 64bit Formula to fill in sequence Office 2010 64bit
Advanced Beginner
Formula to fill in sequence
 
Join Date: Mar 2011
Posts: 97
14spar15 is on a distinguished road
Default Formula to fill in sequence


Hello, I’m looking for a formula (or vba) to fill in a range of years. For example if A1 is 1995-2004 then B1 would be 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004. If A2 is 1968-1972 then B2 would be 1968 1969 1970 1971 1972. Thanks
Attached Files
File Type: xlsm Book1.xlsm (9.7 KB, 12 views)
Reply With Quote
  #2  
Old 04-16-2021, 07:21 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Formula to fill in sequence Windows 7 64bit Formula to fill in sequence Office 2010
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,766
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Is there a reason why you should want different years in the same cell?
Reply With Quote
  #3  
Old 04-16-2021, 08:25 AM
14spar15 14spar15 is offline Formula to fill in sequence Windows 7 64bit Formula to fill in sequence Office 2010 64bit
Advanced Beginner
Formula to fill in sequence
 
Join Date: Mar 2011
Posts: 97
14spar15 is on a distinguished road
Default

Hello, thanks for responding. I need to create a field that can be searched from any one of the years in the range. The field to be searched will not be in Excel.
Reply With Quote
  #4  
Old 04-16-2021, 10:04 AM
p45cal's Avatar
p45cal p45cal is online now Formula to fill in sequence Windows 10 Formula to fill in sequence Office 2019
Expert
 
Join Date: Apr 2014
Posts: 863
p45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant future
Default

In the attached, update your table in column A, then right-click the table in column C and choose Refresh.
Attached Files
File Type: xlsx msofficeforums46806Book1.xlsx (18.4 KB, 10 views)
Reply With Quote
  #5  
Old 04-16-2021, 12:15 PM
Steve Kunkel Steve Kunkel is offline Formula to fill in sequence Windows 10 Formula to fill in sequence Office 2019
Advanced Beginner
 
Join Date: May 2019
Location: Seattle area
Posts: 77
Steve Kunkel is on a distinguished road
Default

Quote:
Originally Posted by p45cal View Post
In the attached, update your table in column A, then right-click the table in column C and choose Refresh.
What the .... How did you make that?? I don't see any VBA code, but I also don't see any Formulas...
Reply With Quote
  #6  
Old 04-16-2021, 12:22 PM
p45cal's Avatar
p45cal p45cal is online now Formula to fill in sequence Windows 10 Formula to fill in sequence Office 2019
Expert
 
Join Date: Apr 2014
Posts: 863
p45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant future
Default

Right-click the result table, choose Table then Edit query.
Reply With Quote
  #7  
Old 04-16-2021, 01:54 PM
Steve Kunkel Steve Kunkel is offline Formula to fill in sequence Windows 10 Formula to fill in sequence Office 2019
Advanced Beginner
 
Join Date: May 2019
Location: Seattle area
Posts: 77
Steve Kunkel is on a distinguished road
Default

Quote:
Originally Posted by p45cal View Post
Right-click the result table, choose Table then Edit query.
Very nice! I didn't even know that was a thing...
Reply With Quote
  #8  
Old 04-17-2021, 01:42 AM
xor xor is offline Formula to fill in sequence Windows 10 Formula to fill in sequence Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

For those having access to TEXTJOIN and SEQUENCE:

=TEXTJOIN(" ",TRUE,TRANSPOSE(SEQUENCE(RIGHT(A2,4)-LEFT(A2,4)+1,,
--LEFT(A2,4))))
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to fill in sequence Formula to add +1 to a sequence Benali Excel 6 05-05-2020 03:47 AM
Formula to calculate fill need between two circles wolfgrrl Excel 2 07-08-2019 04:10 AM
Formula to fill in sequence Create a sequence of numbers using a formula 14spar15 Excel Programming 9 03-19-2018 01:15 AM
Formula for number sequence 14spar15 Excel Programming 4 03-18-2018 07:00 PM
Formula to fill in sequence Need an excel formula to remove dashes in a number sequence jyfuller Excel Programming 3 02-27-2013 10:32 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:47 AM.


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