+ Reply to Thread
Results 1 to 5 of 5

find "windy" in col H, then move this row to sheet 2

  1. #1
    Forum Contributor
    Join Date
    06-29-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    122

    find "windy" in col H, then move this row to sheet 2

    how do i find "windy" in col H, then move this row to sheet 2, got this far:

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,760

    Re: find "windy" in col H, then move this row to sheet 2

    Based on your code perhaps like this?

    Please Login or Register  to view this content.
    I've added a "counter" so the rows pasted to sheet2 will be place beneat each other.

    Using the "cut" command would leave "empty" rows in sheet1 to avoid that I've added the line

    Please Login or Register  to view this content.
    Alf
    Last edited by Alf; 11-26-2012 at 06:04 PM.

  3. #3
    Forum Contributor
    Join Date
    06-29-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    122

    Re: find "windy" in col H, then move this row to sheet 2

    perfect thanks Alf!

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,760

    Re: find "windy" in col H, then move this row to sheet 2

    Glad to be of help and if you liked my solution click on the small star bottom left and give a rating to my answer.

    Alf

  5. #5
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,760

    Re: find "windy" in col H, then move this row to sheet 2

    Thanks for rep.

    Don’t know if this is a problem but as macro works from the bottom of sheet1 going upwards.
    So if one assume that cell H22, H15 and H8 all contains the word “windy”
    The result on sheet2 will be that row 22 (sheet1) is now row 1 (sheet2),
    row 15 (sheet1) will be row 2 (sheet2) and row 8 (sheet1) will be row 3 (sheet2)

    If this is a problem I would suggest a fix like this using lRow as a counter:

    Please Login or Register  to view this content.
    Using the lRow property pastes the row to the same position on sheet2 as it had in sheet1
    then the macro loops through the rows on sheet2 using the CountA function to find the empty rows to delete.

    Alf
    Last edited by Alf; 11-27-2012 at 07:19 PM.

+ 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