is their a macro that will look threw a page of data and report on another
page a list of results based on information in a percific col
colums A to I contain data
want to search col G and do a report on every event that does not contain
"specific text", the report should contain all the data shown on "Data Page"
rows that does not meet the "specific text"
thanks in advance
To get you started look in the vba help index for FIND and then FINDNEXT.
good example given.
--
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
"Rich" <Rich@discussions.microsoft.com> wrote in message
news:529EA644-D76E-4AA7-A7A3-BAD4E97DD073@microsoft.com...
> is their a macro that will look threw a page of data and report on another
> page a list of results based on information in a percific col
>
> colums A to I contain data
>
> want to search col G and do a report on every event that does not contain
> "specific text", the report should contain all the data shown on "Data
> Page"
> rows that does not meet the "specific text"
>
> thanks in advance
This code (adapted from codes provided in this ng) should work (I do not
know VBA).
The selection criteria is entered in a named range “Salesman” in sheet SALES.
From your active sheet containing the data run the following
Macro which will copy the entire row to the target sheet (SALES)
Sub CopySales()
Dim ws As Worksheet
Dim cLastRow As Long
Dim i As Long
Dim j As Long
Set ws = ActiveSheet
cLastRow = ws.Cells(Rows.Count, "B").End(xlUp).Row
On Error Resume Next
On Error GoTo 0
j = 1
For i = 1 To cLastRow
If ws.Cells(i, "B").Value = Range("Salesman").Value Then
ws.Cells(i, "B").EntireRow.Copy _
Destination:=Worksheets("Sales").Cells(j + 9, "A")
j = j + 1
End If
Next i
End Sub
--
Robert
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks