Results 1 to 6 of 6

Auto fill new rows with data

Threaded View

  1. #1
    Registered User
    Join Date
    02-02-2013
    Location
    UK
    MS-Off Ver
    Excel 2013
    Posts
    6

    Auto fill new rows with data

    In column H I have the RANDBETWEEN function, it populates the selected cells, I have inserted new rows into the data and was wondering if there is a function/formula that would auto fill the new empty rows with the RANDBETWEEN data, not bothered if this would cause the entire data column to refresh all the data.

    I did run the Macro recorder and ended up with this VBA

    Option Explicit
    
    Sub AutoInsert()
    '
    ' AutoInsert Macro
    '
    ' Keyboard Shortcut: Ctrl+Shift+A
    '
        Rows("13:18").Select
        Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
        Range("H12").Select
        Selection.AutoFill Destination:=Range("H12:H18"), Type:=xlFillDefault
        Range("H12:H18").Select
    End Sub
    But this works on a fixed number/position of the row selection, I am trying to get the function to auto accept any number of rows any where in the data column

    Administrative Note:
    • Please follow Forum Rule #3 and use code tags.
    • Added for you this time, but please use them in the future…Thanks.
    Last edited by jeffreybrown; 02-02-2013 at 10:39 AM.

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