Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Searching and extracting data within a defined dataset

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Searching and extracting data within a defined dataset

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


  #3   Report Post  
Posted to microsoft.public.excel.programming
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!

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
assign dataset to matching dataset Michael Dirksen Excel Programming 0 June 16th 06 04:34 PM
Extracting defined names jsw47 Excel Programming 2 May 31st 06 10:53 PM
Converting A Quarterly Dataset to Weekly Dataset Dan Thompson Excel Programming 5 November 25th 05 09:27 PM
extracting data from a spreadsheet by searching on columns Tom New Users to Excel 3 October 24th 05 10:36 PM
Searching & Extracting Data Craig[_21_] Excel Programming 5 April 6th 05 03:07 AM


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