+ Reply to Thread
Results 1 to 7 of 7

VBA to replicate a range of cells based on the number of buildings required

  1. #1
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2016 H: 365
    Posts
    857

    VBA to replicate a range of cells based on the number of buildings required

    Morning all,

    I'm currently creating a template that will differ based on the users requirement. The next piece of the puzzle is to get it to copy a range of cells x number of times based on the number of buildings required. I then require the macro to copy data to populate some of those newly created cells.

    I've attached an example of what I'm working with along with a bit more guidance. If you have any queries just give me a shout.

    Thanks in advance,

    Snook

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    7,105

    Re: VBA to replicate a range of cells based on the number of buildings required

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    12,432

    Re: VBA to replicate a range of cells based on the number of buildings required

    Another option
    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2016 H: 365
    Posts
    857

    Re: VBA to replicate a range of cells based on the number of buildings required

    Thanks both, they worked a treat.

    Something else that I would like to incorporate is placing borders around the cells that contains the building information.

    I've managed to pull the following code together which works but I'd be interested to know if there was a more efficient way of achieving this?

    Please Login or Register  to view this content.
    Thanks,

    Snook

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    12,432

    Re: VBA to replicate a range of cells based on the number of buildings required

    I wouldm't say that this was any more efficient, but simply another way of writing it
    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2016 H: 365
    Posts
    857

    Re: VBA to replicate a range of cells based on the number of buildings required

    That looks a lot cleaner, cheers.

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    12,432

    Re: VBA to replicate a range of cells based on the number of buildings required

    Your welcome

+ 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. Replies: 1
    Last Post: 12-05-2016, 12:04 PM
  2. [SOLVED] Return a number from a range of cells based on criteria?
    By Polymorpher in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-25-2014, 11:01 AM
  3. Replies: 4
    Last Post: 06-13-2014, 07:08 PM
  4. [SOLVED] Auto Replicate data to new rows based on number of chances
    By AriesCastillo in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 02-24-2014, 04:59 AM
  5. Not the most efficient at this better off suited constructing buildings
    By Carpenter1375 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 01-06-2014, 01:03 AM
  6. replicate a number of cells
    By alisam in forum Excel General
    Replies: 5
    Last Post: 11-22-2011, 11:27 AM
  7. [SOLVED] Count number of cells based on 2 selections in the same range.
    By jilaba in forum Excel - New Users/Basics
    Replies: 12
    Last Post: 02-16-2010, 11:22 AM

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