![]() |
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 |
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 |
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! |
All times are GMT +1. The time now is 02:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com