+ Reply to Thread
Results 1 to 3 of 3

Copy and Paste Dynamic Range

  1. #1
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Copy and Paste Dynamic Range

    Dear Experts,

    I am looking for some help with copying and pasting dynamic range but being new user of VBA I am not able to define it correctly.
    Purpose of the code is to copy and paste from the values shown in
    1. Cell B1 (Drop Down List of item name)
    2. Cell A2 (Defines the row to start from with a Match formula and picks up first occurrence of the item name)
    3. Cell A3(Counts the number of times item name occurs in column and data is sorted)
    4. Data table is from AD1 to AP578 (Can be moved to new sheet if required it will be hidden)

    What I am trying to achieve is to be able to copy starting from Column AD row 506(506 is the value in B1 using match formula) and copy 61 row (Value in A3 from Count Formula). Copy all 13 Columns and paste in cell A7. It should also change/auto update with change in B1

    In other words I want to copy
    Row(Value in A2) column AD through to Row(A2+(A3-1)) Column AP
    And paste it in A7 and update it every time dropdown in B1 changes value in A2 and A3

    Thanks in advance/VKS

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copy and Paste Dynamic Range

    Put this in the sheet module, it will have to be merged into any other Worksheet_Change macro that is already there:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: Copy and Paste Dynamic Range

    Wowww.....Thanks a lot for your help JBeaucaire.
    Marking it as solved & You already have my star........

+ 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