+ Reply to Thread
Results 1 to 3 of 3

Find 2 Matches Wors Then Cut Selected Rows

  1. #1
    Registered User
    Join Date
    05-04-2006
    Posts
    5

    Question Find 2 Matches Wors Then Cut Selected Rows

    I need to write a coding to identified the specified row is stated Completed or Not Completed, If Completed the selected row will cut and paste to Completed Task (Next Sheet), Not Completed will move down to bottom.

    I have wrote a coding with using FIND method to searching the Completed word, if this word found, then cut the specified row or rows and do the paste.

    The problem i have found is, Let say there is two "Completed" rows in my worksheet, i need to click twice commandbutton in order to Find this words. Is there any method to be done once button clicks, ALL Completed rows will automaticaly move & cut to next sheets.

    Please Login or Register  to view this content.
    Please help on this!!

    Rgds
    Bernard (MIS- Excel Programmer Beginner)

  2. #2
    Loomah
    Guest

    Re: Find 2 Matches Wors Then Cut Selected Rows

    Hi Bernard
    I've replied in Tek-Tips suggesting you check out the help file for Find as
    the example is good for loping through all occurances of what you are
    looking for.

    ;-)

    "bernardng" <[email protected]> wrote
    in message news:[email protected]...
    >
    > I need to write a coding to identified the specified row is stated
    > Completed or Not Completed, If Completed the selected row will cut and
    > paste to Completed Task (Next Sheet), Not Completed will move down to
    > bottom.
    >
    > I have wrote a coding with using FIND method to searching the Completed
    > word, if this word found, then cut the specified row or rows and do the
    > paste.
    >
    > The problem i have found is, Let say there is two "Completed" rows in
    > my worksheet, i need to click twice commandbutton in order to Find this
    > words. Is there any method to be done once button clicks, ALL Completed
    > rows will automaticaly move & cut to next sheets.
    >
    >
    > Code:
    > --------------------
    >
    > Private Sub CommandButton3_Click()
    >
    > Dim fRange As Range
    >
    > On Error Resume Next
    > Set fRange = Range("A18:F37").Find(What:="Completed", After:=ActiveCell,
    > LookIn:=xlValues, _
    > LookAt:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
    > MatchCase:=True, SearchFormat:=False).Activate
    > Cell.FindNext(After:=ActiveCell).Activate
    > Range(ActiveCell.Offset(0, -1), ActiveCell.Offset(0, -5)).Cut Range("A" &
    > Cells(Rows.Count, 1).End(xlUp).Row + 1)
    >
    > End Sub
    >
    > --------------------
    >
    >
    > Please help on this!!
    >
    > Rgds
    > Bernard (MIS- Excel Programmer Beginner)
    >
    >
    > --
    > bernardng
    > ------------------------------------------------------------------------
    > bernardng's Profile:
    > http://www.excelforum.com/member.php...o&userid=34117
    > View this thread: http://www.excelforum.com/showthread...hreadid=543976
    >




  3. #3
    Registered User
    Join Date
    05-04-2006
    Posts
    5

    Smile Re: Please see Attachement Zip

    Thanks for ur reply, I know is must using Loop To find untill it found, but I dont know how to put in at my coding, If you do, please provide some tips for me. Thanks!

    For more understanding, you can refer to my attachment excel files.
    Attached Files Attached Files

+ 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