PC Review


Reply
Thread Tools Rate Thread

Conditional CCP entire row

 
 
=?Utf-8?B?Q0xS?=
Guest
Posts: n/a
 
      16th Apr 2007
Hi All........
If someone would be so kind, I would like to interrogate Column F of sheet1
and for every value that begins with MISC, to Copy and Paste that entire row
over to Sheet2 (adding it to the bottom of the database there), and then
deleting that row from sheet1. Somehow my recorder just cant get there from
here..........

TIA
Vaya con Dios,
Chuck, CABGx3




 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      16th Apr 2007
Sub MoveData()
Dim rng As Range
Dim rng1 As Range
Dim rng2 As Range
Dim sAddr As String
With Worksheets("Source")
Set rng = .Columns(6).Find("MISC*", _
After:=.Range("F65536"), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not rng Is Nothing Then
sAddr = rng.Address
Do
If rng1 Is Nothing Then
Set rng1 = rng
Else
Set rng1 = Union(rng, rng1)
End If
Set rng = .Columns(6).FindNext(rng)
Loop Until rng.Address = sAddr
Set rng2 = Worksheets("Destination" _
).Cells(Rows.Count, 1).End(xlUp)(2)
rng1.EntireRow.Copy rng2
rng1.EntireRow.Delete
End If
End With

End Sub

Change sheet names to reflect yours.

--
Regards,
Tom Ogilvy

"CLR" wrote:

> Hi All........
> If someone would be so kind, I would like to interrogate Column F of sheet1
> and for every value that begins with MISC, to Copy and Paste that entire row
> over to Sheet2 (adding it to the bottom of the database there), and then
> deleting that row from sheet1. Somehow my recorder just cant get there from
> here..........
>
> TIA
> Vaya con Dios,
> Chuck, CABGx3
>
>
>
>

 
Reply With Quote
 
=?Utf-8?B?Q0xS?=
Guest
Posts: n/a
 
      16th Apr 2007
That is INSTANTLY COOL Tom..........many many thanks. It does exactly as I
need.

Vaya con Dios,
Chuck, CABGx3



"Tom Ogilvy" wrote:

> Sub MoveData()
> Dim rng As Range
> Dim rng1 As Range
> Dim rng2 As Range
> Dim sAddr As String
> With Worksheets("Source")
> Set rng = .Columns(6).Find("MISC*", _
> After:=.Range("F65536"), _
> LookIn:=xlValues, _
> LookAt:=xlWhole, _
> SearchOrder:=xlByRows, _
> SearchDirection:=xlNext, _
> MatchCase:=False)
> If Not rng Is Nothing Then
> sAddr = rng.Address
> Do
> If rng1 Is Nothing Then
> Set rng1 = rng
> Else
> Set rng1 = Union(rng, rng1)
> End If
> Set rng = .Columns(6).FindNext(rng)
> Loop Until rng.Address = sAddr
> Set rng2 = Worksheets("Destination" _
> ).Cells(Rows.Count, 1).End(xlUp)(2)
> rng1.EntireRow.Copy rng2
> rng1.EntireRow.Delete
> End If
> End With
>
> End Sub
>
> Change sheet names to reflect yours.
>
> --
> Regards,
> Tom Ogilvy
>
> "CLR" wrote:
>
> > Hi All........
> > If someone would be so kind, I would like to interrogate Column F of sheet1
> > and for every value that begins with MISC, to Copy and Paste that entire row
> > over to Sheet2 (adding it to the bottom of the database there), and then
> > deleting that row from sheet1. Somehow my recorder just cant get there from
> > here..........
> >
> > TIA
> > Vaya con Dios,
> > Chuck, CABGx3
> >
> >
> >
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting for entire row HeatherJ Microsoft Excel Worksheet Functions 4 17th Feb 2010 08:03 PM
Conditional formatting Max to a entire row A1:D1 with E1 being Ma SunshineinFt.Myers Microsoft Excel Worksheet Functions 2 24th Feb 2009 05:38 AM
Conditional Format entire row CrimsonPlague29 Microsoft Excel Misc 3 1st Mar 2008 02:04 AM
Conditional Format an entire row BK Microsoft Excel Discussion 5 1st Feb 2008 09:31 PM
conditional formatting for entire row =?Utf-8?B?aDIwcG9sbw==?= Microsoft Excel Misc 2 20th Jun 2007 09:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:30 AM.