+ Reply to Thread
Results 1 to 4 of 4

Search a sheet, find a cell, cut entire row, delete row & paste to a new sheet VBA

  1. #1
    Registered User
    Join Date
    12-19-2018
    Location
    Solihull UK
    MS-Off Ver
    Microsoft Office Professional 2019
    Posts
    9

    Search a sheet, find a cell, cut entire row, delete row & paste to a new sheet VBA

    Hi All !

    Using MS Office Professional 2019 - but I'm very much self taught with VBA & Excel in general !

    I know this is really clumsy vba......

    In words - I find a random value from either of two ranges in FARMDATA or FARMDATAPLY, depending on a userform radio button - then select the next 2 rows and return all three values to the Sheet VISITS.

    I now want to cut those entire rows and copy them to a new worksheet (not created yet - but to be called VISITSCONFIRMED) this means that the random selections cannot be repeated. (Because they wont be in the range)

    Here's my vba below - plus a Sanitised Version of the workbook attached.

    Any help gratefully appreciated ...........

    Please Login or Register  to view this content.

    So i need to add a line that cuts and deletes the entry in FARMDATA so that it cannot be selected again elsewhere.............. and any tips to improve the coding for an ExcelIdiot would be really great too .............................
    Attached Files Attached Files

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

    Re: Search a sheet, find a cell, cut entire row, delete row & paste to a new sheet VBA

    You can practice not to use selects.

    This snip-it will work with out having to be on the sheet ("Data")
    Please Login or Register  to view this content.
    If you wanted to find something in column G Sheets("FARMDATA") you don't have to select the sheet in order to find it.

    This snippet I just use the word "SomeThing" to find. If the item is found do what you want with it.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-19-2018
    Location
    Solihull UK
    MS-Off Ver
    Microsoft Office Professional 2019
    Posts
    9

    Re: Search a sheet, find a cell, cut entire row, delete row & paste to a new sheet VBA

    davesexcel !

    davesExcellent ! thankyou !

    I'm just trying to work out the code for what I want to do with the found cell - but that really was a great help !

    Cheers !


    Johnny3Gloves.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Search a sheet, find a cell, cut entire row, delete row & paste to a new sheet VBA

    That's great. And if that takes care of your question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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. VBA To search for Cell Value on a different sheet and delete entire row
    By Jon78p in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-02-2016, 01:15 PM
  2. Replies: 6
    Last Post: 11-13-2015, 07:36 AM
  3. [SOLVED] VBA to find Column, search the cell value and delete entire row on condition met
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-08-2014, 01:23 PM
  4. Find blank cell, then paste entire row onto another sheet
    By Misterturtle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2013, 05:34 PM
  5. [SOLVED] [How-to] ask marco to find, cut, paste entire row to new sheet if matched?
    By hark in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 11-15-2012, 01:55 AM
  6. VBA Search workbook for user value, copy/paste entire row to last sheet for matching
    By jasonkrispy21 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-22-2012, 03:42 PM
  7. Find value from sheet 1, cell A1 in sheet(s) 2 (3, 4?), copy, paste row to sheet 8
    By fleeting in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2011, 03:31 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