+ Reply to Thread
Results 1 to 5 of 5

Macro to copy range a data

Hybrid View

Howardc1001 Macro to copy range a data 08-06-2019, 09:49 AM
queuesef Re: Macro to copy range a data 08-06-2019, 11:24 AM
Howardc1001 Re: Macro to copy range a data 08-06-2019, 11:52 AM
queuesef Re: Macro to copy range a data 08-06-2019, 02:39 PM
Howardc1001 Re: Macro to copy range a data 08-06-2019, 09:27 PM
  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2024
    Posts
    2,876

    Macro to copy range a data

    I have a range of account numbers on Sheet "imported Data' in Col A


    I would like a macro to copy the data in Col A:D where the range of account numbers in Col A in in the range from KR-65 3000 to KR-65 3299


    In the sample data attached A1:d17 to be copied and pasted to "stock items"


    Your assistance in this regard is most appreciated
    Attached Files Attached Files
    Last edited by Howardc1001; 08-06-2019 at 09:52 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2016
    Location
    NY
    MS-Off Ver
    2010
    Posts
    459

    Re: Macro to copy range a data

    I assumed no more than 1000 records (however, you can change it if you need to).
    * If this has helped you in any way, Please click on the * to add reputation...Thank you!
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2024
    Posts
    2,876

    Re: Macro to copy range a data

    Thanks for the help. If I wanted to limit the items in the range to be copied (Col A to D) where the account numbers to be copied is from say KR-65 3020 to KR-65 3240, how do I amend your code to do this ?

  4. #4
    Valued Forum Contributor
    Join Date
    11-02-2016
    Location
    NY
    MS-Off Ver
    2010
    Posts
    459

    Re: Macro to copy range a data

    You could change the code in the Macro to
    If c >= "KR-65 3020*" And c <= "KR-65 3240*" Then
    (original code was: If c Like "KR-65*" Then. OR
    you could use a filter on the data to copy what you would like. Use the Data Filter on the Data ribbon. PS you may need to open up more records IF you have over 1000. I didn't know exactly how many records you would have and limited it to 1000.
    * If this has helped you in any way, Please click on the * to add reputation...Thank you!

  5. #5
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2024
    Posts
    2,876

    Re: Macro to copy range a data

    Thanks for the help -amended code works perfectly

+ 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. VBA Macro: Copy range of data to another sheet
    By danwoltrs in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-28-2015, 02:17 PM
  2. [SOLVED] macro to copy data from dynamc range
    By excelhelpseeker in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-09-2014, 10:40 AM
  3. Macro/VBA: Copy and Paste Multiple Range Data
    By EvoLancer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-04-2013, 04:43 PM
  4. Macro broken - copy data range column to empty data range column
    By Cascus in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-06-2011, 05:20 PM
  5. Macro failed to copy and paste data range
    By pjbassdc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2011, 07:36 PM
  6. macro to copy range data from another workbook
    By steven_thomas in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-18-2006, 03:01 PM

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