Thread
:
Asstance need
View Single Post
#
4
Posted to microsoft.public.excel.programming
Charles Chickering
external usenet poster
Posts: 272
Asstance need
Martin, Can you send a copy of the workbook and a more detailed description
of what you want to happen to:
?
--
Charles Chickering
"A good example is twice the value of good advice."
"Hinojosa via OfficeKB.com" wrote:
I'm sorry i'm new at this, what does r=to, and would i do this for each
person?
Charles Chickering wrote:
Try something like this:
Sub FindPayRoll()
Dim r As Range
Dim fC As Range 'First Cell
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Set ws1 = Worksheets("Sheet1")
Set ws2 = Worksheets("Sheet2")
Set r = ws1.Cells.Find(What:="REPORTED TO PAYROLL", _
After:=Range("A1"), LookIn:=xlFormulas, LookAt:=xlWhole, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
If r Is Nothing Then Exit Sub
Set fC = r
Do
r.Resize(1,9).Copy ws2.Range("A" & ws2.Rows.Count).End(xlUp).Offset(1)
Set r = ws1.Cells.Find(What:="REPORTED TO PAYROLL", _
After:=r, LookIn:=xlFormulas, LookAt:=xlWhole, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
Loop Until r.Address = fC.Address
End Sub
Good Day,
[quoted text clipped - 55 lines]
MartÃ*n Hinojosa
--
Message posted via
http://www.officekb.com
Reply With Quote
Charles Chickering
View Public Profile
Find all posts by Charles Chickering