Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default I need a macro to grab specific data and transfer it to a now worksheet

Hello all,

I have another little macro I need help with, and being new to this I
have been banging my head against my monitor trying to figure it out.
Here is what I am trying to do. I have fields a,b,c,d and I need to
filter data from field b. So I need to get all data the begins with SC
and transfer the entire row to Sheet2, and I need to get all data that
begins with SU and transfer the entire row to sheet3.

Thanks for any help.

Jason

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default I need a macro to grab specific data and transfer it to a now worksheet

Hi Jason,

Here's some code

Sub FilterData()
Dim iLastRow As Long
iLastRow = Cells(Rows.Count, "B").End(xlUp).Row
With Range("B1:B" & iLastRow)
.AutoFilter Field:=1, Criteria1:="SC"
.SpecialCells(xlCellTypeVisible).EntireRow.Copy _
Destination:=Worksheets("Sheet2").Range("A1")
.AutoFilter
.AutoFilter Field:=1, Criteria1:="SU"
.SpecialCells(xlCellTypeVisible).EntireRow.Copy _
Destination:=Worksheets("Sheet3").Range("A1")
.AutoFilter
End With
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jason Ward" wrote in message
ups.com...
Hello all,

I have another little macro I need help with, and being new to this I
have been banging my head against my monitor trying to figure it out.
Here is what I am trying to do. I have fields a,b,c,d and I need to
filter data from field b. So I need to get all data the begins with SC
and transfer the entire row to Sheet2, and I need to get all data that
begins with SU and transfer the entire row to sheet3.

Thanks for any help.

Jason



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default I need a macro to grab specific data and transfer it to a now worksheet


Hi Bob, Thanks for all your help. I have a quick question for you.
Criteria1:="SC" Filter all data that begins with "SC" for example some
maybe SC-11304 and others maybe SCC-39488 etc... and the same with "SU"

Thanks again,

Jason



*** Sent via Developersdex http://www.developersdex.com ***
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default I need a macro to grab specific data and transfer it to a now worksheet

Criteria1:="SC*"

Same for SU
--
Regards,
Tom Ogilvy

"Jason Ward" wrote in message
...

Hi Bob, Thanks for all your help. I have a quick question for you.
Criteria1:="SC" Filter all data that begins with "SC" for example some
maybe SC-11304 and others maybe SCC-39488 etc... and the same with "SU"

Thanks again,

Jason



*** Sent via Developersdex http://www.developersdex.com ***



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default I need a macro to grab specific data and transfer it to a now worksheet



I know that this is a bit of topic, but is there a way that I could code
a button to import data from a DBF 4 file into a worksheet in stead of
having that dbf 4 file open in it own window? Thanks again for all of
the help. It is really appreciated.

Jason

*** Sent via Developersdex http://www.developersdex.com ***
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
transfer data from worksheet to another dave Excel Discussion (Misc queries) 1 September 4th 08 06:14 AM
Macro to Move Specific Data to Another Worksheet jeannie v Excel Worksheet Functions 1 January 20th 08 06:30 PM
Excel Worksheet transfer of Data MaggieB New Users to Excel 2 July 23rd 07 04:38 PM
macro to sort data in worksheet by specific date joey Excel Discussion (Misc queries) 0 November 14th 05 07:59 PM
I only want to grab specific cells Gary Phillips[_2_] Excel Programming 1 July 20th 04 10:25 PM


All times are GMT +1. The time now is 04:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"