View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ben Burns Ben Burns is offline
external usenet poster
 
Posts: 6
Default Searching and extracting data within a defined dataset

On 13 Jun, 16:51, Tom Ogilvy
wrote:
turn on the macro recorder and apply an autofilter to this range. Apply
filter criteria to columns B and F then remove the filter.

Now turn off the macro recorder and look at the recorded code.

In the section after the filter is applied, add code like

Activesheet.Autofilter.Range.copy Destination:= _
worksheets("Sheet2").Range("A1")

--
Regards,
Tom Ogilvy

"Ben Burns" wrote:
Hello


I'm trying to write some vba code to do the following, and would
appreciate any help/advice.


Within a predefined dataset (Range A3:H1000), run a conditional search
to find rows with a specific number in column B and a specific text
string in column F. If those two criteria are met, copy cells in
column E and H to the first blank row in another worksheet. Iterate
for all populated rows in the range.


Many thanks
Ben


Many thanks Tom. Simple solution really!