+ Reply to Thread
Results 1 to 2 of 2

Copy row details Automatically a number of times as defined by a value in a cell

  1. #1
    Registered User
    Join Date
    07-06-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    4

    Copy row details Automatically a number of times as defined by a value in a cell

    I want to copy formula & formatting from say Row 3, Clm C to R to the next row a number of times designated by the value populated into a cell (say B1). ie if B1=4 i want to copy Row 3 Clm C-R, 4 times to Row4,5,6 & 7.
    Note i want the copy to happen automatically when the detail is entered into cell B1
    See attached file.

    Any Ideas would be great
    Thanks
    BOB
    Attached Files Attached Files
    Last edited by bob_caw; 07-13-2012 at 12:31 PM.

  2. #2
    Registered User
    Join Date
    07-06-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Copy row details Automatically a number of times as defined by a value in a cell

    I got it.
    [/CODE]
    Dim LastRow As Long
    Dim NbRows As Long
    If (Target.Address = Range("B1").Address) Then
    LastRow = Range("C" & Rows.Count).End(xlUp).Row
    NbRows = Range("B1")
    Range("C4:R" & LastRow + 1).ClearContents
    Range("C3:R" & 3 + NbRows).FillDown
    End If
    End Sub
    [/CODE]

+ 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