+ Reply to Thread
Results 1 to 3 of 3

Auto fill in columns

Hybrid View

  1. #1
    Registered User
    Join Date
    11-02-2011
    Location
    Dubai
    MS-Off Ver
    Excel 2003
    Posts
    1

    Auto fill in columns

    Hi,

    How do you auto fill the cells in a column

    Eg:

    1 text1
    2
    3
    4 text2
    5
    6
    row 2 and 3 should be filled with text1 and 5, 6 should be filled with text2. Double clicking the corner of text1 cell is not what I am looking for. Please help

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Auto fill in columns

    I guess you have posted this thread in the wrong category.
    Nevertheless, try this code out -
    Sub autofill_data()
    
    lastrow = Range("A" & Rows.Count).End(xlUp).Row
    
    For i = 1 To lastrow
    
        If Range("A" & i).Value <> "" And Range("A" & i + 1).Value = "" Then
            
            Range("A" & i + 1).Value = Range("A" & i).Value
            
        End If
        
    Next
    
    End Sub

  3. #3
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Auto fill in columns

    You can use trick like below:

    1.select all column with your data (for examples column A)
    2. press F5 => choose special => choose empty cells
    3. put symbol “=” and press key with arrow up “↑” on your keyboard
    4. now You hit Ctrl + Enter
    And you have what you want (the last text You can fill down with Ctrl +D)
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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