+ Reply to Thread
Results 1 to 6 of 6

Cell copy the data to another cell and insert a blank row

Hybrid View

  1. #1
    Registered User
    Join Date
    07-01-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    50

    Cell copy the data to another cell and insert a blank row

    Hi,

    Hope some one can help me on my query. I would like to write a macro which display a result as describe on the attachment. Is it possible to copy the data from one cell to other cell and insert a blank row?

    Thanks for your help!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Cell copy the data to another cell and insert a blank row

    Hi
    select your range and run this
    Sub aa()
    Dim c As Range
    Dim x As Long
    x = 5
    For Each c In Selection
        Cells(x, 3) = c
        x = x + 2
        Next
    End Sub
    tell is it ok?
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Registered User
    Join Date
    07-01-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Cell copy the data to another cell and insert a blank row

    Hi Tom1977,

    Thanks for your quick reply. Would you mind to attached any example to understand? I have never write any macro in excel. Also will this solution match the result describe on my "dummy_data" attachment?

    Thanks

  4. #4
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Cell copy the data to another cell and insert a blank row

    In attachment there is file with macro
    select your range press Alt + F11 and press F5 to run code (this is one of few method to run macro)
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-01-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Cell copy the data to another cell and insert a blank row

    I have tried the script and selecte the range but It doesn't show the result as mentioned on my initial file. How can i replicate this script to my dummy_data file?

    Thanks in advanced!

  6. #6
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Cell copy the data to another cell and insert a blank row

    In your first post was such statment
    write a macro which display a result as describe on the attachment
    and in your file is this
    Results shoud be here
    So I was able only to guess what results should be and my code does what I read from above.

    And if You want run code in Your file:
    1. Press Alt + F11
    2. Press "insert" on windows tab which will appear
    3. choose module
    4. past code into module.

    and use e.g. pressing F5
    Last edited by tom1977; 05-30-2012 at 04:43 AM.

+ 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