+ Reply to Thread
Results 1 to 4 of 4

VBA; Move row based on cell value to another sheet on same number of row.

  1. #1
    Registered User
    Join Date
    01-01-2015
    Location
    united kingdom
    MS-Off Ver
    2003
    Posts
    17

    VBA; Move row based on cell value to another sheet on same number of row.

    I am using this code to move row based on cell value to another sheet. This code is moving the row which contain ok in column A from sheet1 to sheet2. But I need if find ok in row 20 and cloumn A. Then the row will go to 20 nth row to the sheet2. Suppose row 4,7,4,13,42,45,,98,100 contain ok in column A. I need to move that rows to sheet two in same number of row.
    row 4 will go to 4rth row in shhet2.
    row 7 will go to 7nth row in shhet2.
    row 13 will go to 13nth row in shhet2.
    It will continue for the next row.

    Please Login or Register  to view this content.
    Last edited by Nirupay Robi; 01-13-2015 at 07:51 AM.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA; Move row based on cell value to another sheet on same number of row.

    Untested, but maybe?

    Please Login or Register  to view this content.
    Last edited by JOHN H. DAVIS; 01-13-2015 at 07:28 AM.

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: VBA; Move row based on cell value to another sheet on same number of row.

    Attaching a sample workbook enables others to work on your problem:

    Although somebody could replicate your workbook, it would be much easier if you were to attach a sample.


    To attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  4. #4
    Registered User
    Join Date
    01-01-2015
    Location
    united kingdom
    MS-Off Ver
    2003
    Posts
    17

    Re: VBA; Move row based on cell value to another sheet on same number of row.

    Sir, this code is working now, thanks for your solution.


    #sir I know that attaching a sample sheet is essential. sorry for my mistake.

+ 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. Replies: 0
    Last Post: 11-03-2014, 04:17 PM
  2. [SOLVED] Move a row to another sheet in the same workbook based on the value of one cell
    By Philpot in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-09-2013, 07:00 AM
  3. [SOLVED] Move entire row from one sheet to another based on cell value.
    By romanm in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-29-2013, 06:20 PM
  4. VBA CODE to move rows from one sheet(1) to another sheet(2) based on data in cell
    By fozzieulo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-08-2013, 02:43 PM
  5. Macro to move rows from one sheet to another sheet based on a cell vaule
    By d55272 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 10-09-2012, 03:33 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