+ Reply to Thread
Results 1 to 5 of 5

Copy a column and paste in specific cells.

  1. #1
    Registered User
    Join Date
    12-27-2013
    Location
    Ohio,USA
    MS-Off Ver
    Excel 2013
    Posts
    4

    Copy a column and paste in specific cells.

    I have dates in Column I (for the whole year) and i would like to paste them into specific cells in three different Columns A,B,C (ie A2, A5, A8, A11 etc) Same Numbers different letter for each respective column. I can get it to go from one cell to another but when i try to specify specific cells everything goes crazy. Any help would be appreciated.

    This is what i have so far:

    Sub Test()

    Range("I1").Select
    Selection.Copy
    Range("A2").Select
    ActiveSheet.Paste
    End Sub

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Copy a column and paste in specific cells.

    Limebites,

    Welcome to the Excel Forum.

    We do not know where in column I your dates begin.

    And, we do not know what dates go into what columns.

    So that we can get it right the first time, please post your workbook.

    The structure and data types of the sample workbook must exactly duplicate the real workbook. Include a clear and explicit explanation of your requirements.

    And, also include (manually formatted by you), where the dates go in columns A, B, and, C.

    To attach your workbook, scroll down and click on the Go Advanced button, then scroll down and click on the Manage Attachments button.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  3. #3
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Copy a column and paste in specific cells.

    Limebites,

    I assume that you dates are in column I beginning in cell I1.

    The macro uses four arrays in memory.

    Detach/open workbook ReorgData oiarray to aarray barray carray - Limebites - EF977786 - SDG15.xlsm and run the ReorgData macro.


    If you want to use the macro on another workbook:

    Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).

    1. Copy the below code
    2. Open your NEW workbook
    3. Press the keys ALT + F11 to open the Visual Basic Editor
    4. Press the keys ALT + I to activate the Insert menu
    5. Press M to insert a Standard Module
    6. Where the cursor is flashing, paste the code
    7. Press the keys ALT + Q to exit the Editor, and return to Excel
    8. To run the macro from Excel press ALT + F8 to display the Run Macro Dialog. Double Click the macro's name to Run it.

    Please Login or Register  to view this content.
    Before you use the macro with Excel 2007 or newer, save your workbook, Save As, a macro enabled workbook with the file extension .xlsm

    Then run the ReorgData macro.

  4. #4
    Registered User
    Join Date
    12-27-2013
    Location
    Ohio,USA
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Copy a column and paste in specific cells.

    Wow the macro work's perfectly stanleydgromjr. I feel as though i was definitely in over my head with this macro. This is my first time back to the computer since i posted the question and i was defiantly not expecting this thank you so much.

  5. #5
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Copy a column and paste in specific cells.

    Limebites,

    Thanks for the feedback.

    You are very welcome. Glad I could help.

    And, come back anytime.

+ 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. How to copy and paste all rows between two specific cells.
    By dutroy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-22-2013, 02:26 AM
  2. Copy several columns and paste into specific column on another worksheet
    By lcy_84 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-31-2012, 09:19 AM
  3. [SOLVED] Find all cells with a specific background color then copy/paste to correct column
    By d_rose in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-20-2012, 10:18 AM
  4. [SOLVED] Copy and Paste a specific Column to a Column that's heading matches a particular cell
    By Rexmond in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-17-2012, 12:29 AM
  5. [SOLVED] Macro Copy Paste specific cells
    By guydixon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-21-2012, 01:16 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