LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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.


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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I find out how many rows I have selected? ABR Excel Discussion (Misc queries) 7 April 3rd 23 10:56 AM
Add up Values if Find Matches x 2 Sean Excel Worksheet Functions 9 November 16th 07 12:21 PM
Find Data from one sheet that matches Brian Shafer Excel Discussion (Misc queries) 1 October 19th 07 06:58 PM
Trying to find Matches and Give a Result cheryl Excel Worksheet Functions 5 July 26th 07 09:06 PM
how to find all matches in an array Greg Excel Discussion (Misc queries) 2 August 31st 05 09:04 PM


All times are GMT +1. The time now is 12:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"