+ Reply to Thread
Results 1 to 5 of 5

[SOLVED} deleting rows and moving data

  1. #1
    Forum Contributor
    Join Date
    11-09-2008
    Location
    Washington State
    MS-Off Ver
    2007
    Posts
    164

    [SOLVED} deleting rows and moving data

    I have created a spreadsheet with 4820 rows of data (4821 for computational purposes, the last row being blank) with 5 columns. I need help in doing three things.

    1. every third row is blank and it needs to be removed (3, 6, 9,...4818, 4821). Once this is accomplished,

    2. I need to move the data that is now found in the even rows, column E moved to the above, current odd row, column F. (ie. E2 to F1, E4 to F3, E6 to F5,...E4808 to F4807...,E4820 to F4819 (however it won't go this high). then

    3. I need to delete all the current even rows, as the data I need will be in the odd rows.

    I am hoping this is not as difficult to do as it is to explain. I am attaching a sample before and a sample after of what I am hoping to achieve.

    Many thanks in advance.
    Attached Files Attached Files
    Last edited by abuchan; 07-27-2009 at 02:16 AM. Reason: E4 to F3

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

    Re: deleting rows and moving data

    abuchan,

    See the attached workbook "Move data Sheet1 to Sheet2 Step 3 - abuchan - SDG09.xlsm" with macro "MoveData".


    Detach and open the workbook and run the "MoveData" macro.


    The macro will move your data to Sheet2.
    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 Contributor
    Join Date
    11-09-2008
    Location
    Washington State
    MS-Off Ver
    2007
    Posts
    164

    Re: deleting rows and moving data

    Thank you. I will give it a try tonight and let you know how it works.

    I appreciate your efforts,

    Alec.

  4. #4
    Forum Contributor
    Join Date
    11-09-2008
    Location
    Washington State
    MS-Off Ver
    2007
    Posts
    164

    Re: <solved> deleting rows and moving data

    Thank you! It work wonderfully.

    Please correct me if I am incorrect, but in trying to figure out the code, it looks to me that it should work with any amount of rows, as long as they have the same format.

    I will have a very similar challenge later this week, however a couple of the columns will be slightly different. I was trying to go through your code to see if I could make the minor changes to make it work. Is that something you recommend, or should I post the variation and go from there?

    Thank you again. Your work is very effective.

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

    Re: [SOLVED} deleting rows and moving data

    abuchan,

    I will have a very similar challenge later this week, however a couple of the columns will be slightly different. I was trying to go through your code to see if I could make the minor changes to make it work. Is that something you recommend, or should I post the variation and go from there?
    If you are not familiar with VBA, you should create a new post.

    Then you can then send me a "Private Message" with a link to your new post, and I will check it out.

+ 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