+ Reply to Thread
Results 1 to 5 of 5

VBA Code to copy/paste & cut/paste

  1. #1
    Registered User
    Join Date
    06-05-2017
    Location
    Africa
    MS-Off Ver
    2010
    Posts
    43

    VBA Code to copy/paste & cut/paste

    I need some help in form of vba code.

    Data set starts on Row 2 (A2) from columns A to AG. Rows are limitless. I need a code to copy & paste downwards text & values in columns A to X THEN values in columns Z to AG to cut/paste downwards under column Y so that I eliminate Z to AG columns and work (Sort & Filter) on only one column Y.

    Thanks

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: VBA Code to copy/paste & cut/paste

    Can you post a before and after example?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    06-05-2017
    Location
    Africa
    MS-Off Ver
    2010
    Posts
    43

    Re: VBA Code to copy/paste & cut/paste

    Approximate structure:

    Y Z AA AB AC AD AE AF AG
    12.00 22285 1.20 0.12 0.01 120.02 1,200.22 12,002.23 120,022.28 1,
    32.8453377 3.28 0.33 0.03 328.45 3,284.53 32,845.34 328,453.38 3,
    6.6436289 0.66 0.07 0.01 66.44 664.36 6,643.63 66,436.29 6
    59.3376378 5.93 0.59 0.06 593.38 5,933.76 59,337.64 593,376.38 5,
    0.7543308 0.08 0.01 0.00 7.54 75.43 754.33 7,543.31 7
    31.2962455 3.13 0.31 0.03 312.96 3,129.62 31,296.25 312,962.46 3,
    0.2937732 0.03 0.00 0.00 2.94 29.38 293.77 2,937.73 2
    80.3603747 8.04 0.80 0.08 803.60 8,036.04 80,360.37 803,603.75 8,
    0.5946359 0.06 0.01 0.00 5.95 59.46 594.64 5,946.36 5
    0.9234962 0.09 0.01 0.00 9.23 92.35 923.50 9,234.96 9

    First copy data from column A to X 8 times (Z to AG is 8 ) downwards THEN Bring all values in columns Z to AG all under column Y by cut/paste

    thanks

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,861

    Re: VBA Code to copy/paste & cut/paste

    Will you please attach a sample Excel workbook?

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    06-05-2017
    Location
    Africa
    MS-Off Ver
    2010
    Posts
    43

    Re: VBA Code to copy/paste & cut/paste

    AliGW

    Am not near a PC, you may have to wait, please.

    Thanks

+ 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. [SOLVED] Tweak Code for Copy and Paste Special vs Cut and Paste
    By Adam Schaefer in forum Excel General
    Replies: 1
    Last Post: 04-18-2016, 11:12 AM
  2. [SOLVED] Paste restriction code in vba not affecting GUI copy/paste only Ctrl+V
    By DT211569x in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-25-2016, 01:28 PM
  3. [SOLVED] VB Code to copy and paste from all text file and paste into single file
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-29-2015, 06:00 PM
  4. Replies: 3
    Last Post: 01-01-2015, 06:26 AM
  5. Replies: 0
    Last Post: 10-29-2013, 09:38 AM
  6. Copy and paste code pasting won't paste just values
    By thehotbreadguy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2013, 11:12 PM
  7. Replies: 1
    Last Post: 01-04-2005, 06:06 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