Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default macro to search and list data

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default macro to search and list data

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



Reply
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
Data Validation list search Pete_UK Excel Discussion (Misc queries) 1 September 30th 09 03:54 PM
Macro Search and Copy between Cells with unique data david@damprodu Excel Discussion (Misc queries) 2 March 6th 09 12:40 PM
Search for a specific entry in a long data validation list Heinrich Excel Discussion (Misc queries) 1 May 4th 07 07:29 PM
Macro to search for and display data in another worksheet Mark H Excel Worksheet Functions 0 June 14th 05 12:40 PM
Search List of Data Nigel[_8_] Excel Programming 2 February 6th 04 06:34 PM


All times are GMT +1. The time now is 03:37 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"