+ Reply to Thread
Results 1 to 2 of 2

Custom Drag Fill Series possibility??

Hybrid View

  1. #1
    Registered User
    Join Date
    12-05-2013
    Location
    Where Am I
    MS-Off Ver
    Excel 2010
    Posts
    23

    Custom Drag Fill Series possibility??

    Given the following cell value: 037-1090000 in B29.

    Is it possible to create a custom drag fill series where characters 5&6 (the "10" potion) would change instead of the last digits of the cell value? Furthermore, fill by numbers need to be divisible by 10 and the custom drag & fill would only be applicable to range("B29:B37'). Possible??

    Finished result would look like this:
    037-1090000
    037-2090000
    037-3090000
    037-4090000
    037-5090000
    037-6090000
    037-7090000
    037-8090000
    037-9090000

    Thanks!

  2. #2
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: Custom Drag Fill Series possibility??

    Without VBA:

    =CONCATENATE("037-",ROW()-28,"090000")
    With VBA:

    Sub TextSequence()
    
        Dim iFirstRow   As Integer
        Dim iLastRow    As Integer
        Dim iRows       As Integer
        Dim iLoop       As Integer
        Dim sColumn     As String
        Dim sTextLeft   As String
        Dim sTextRight  As String
        
        'Set these values
        iFirstRow = 29
        iRows = 8
        sColumn = "B"
        sTextLeft = "037-"
        sTextRight = "090000"
        
        'Rest of code bellow
        iLastRow = iFirstRow + iRows
        
        For iLoop = iFirstRow To iLastRow
            Range(sColumn & iLoop).Value = sTextLeft & iLoop - iFirstRow + 1 & sTextRight
        Next iLoop
    
    End Sub
    Last edited by Gatti; 01-13-2016 at 04:36 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Custom fill series
    By 2013 in forum Excel General
    Replies: 2
    Last Post: 11-20-2013, 02:10 PM
  2. [SOLVED] Drag and fill with a custom date/time format
    By Mr.Chip in forum Excel General
    Replies: 2
    Last Post: 07-17-2013, 12:36 PM
  3. Custom Numerical Fill Series
    By sabrinigreen in forum Excel General
    Replies: 7
    Last Post: 12-21-2011, 10:50 PM
  4. Replies: 1
    Last Post: 01-04-2011, 04:47 AM
  5. Replies: 1
    Last Post: 07-06-2010, 06:06 PM
  6. Can't Drag & fill series....
    By Little Master in forum Excel General
    Replies: 2
    Last Post: 10-19-2008, 01:55 AM
  7. Custom fill series?
    By martinkorner in forum Excel General
    Replies: 15
    Last Post: 06-25-2006, 01:30 PM
  8. [SOLVED] I've created a custom fill series. Now I don't know how to use i.
    By candybluevt in forum Excel General
    Replies: 2
    Last Post: 01-26-2005, 05:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1