Certain info from one workbook to another

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Workbook A. I want to take certain rows and display them in order
in Workbook B.

The rows have 25 columns. If I take all rows that have 302 in Column B how
can I display those row contents in an entirely different workbook just
containing 302 info?
 
Data>Filter>Autofilter for 302 on Column B

Copy and paste the visible results to the other workbook.


Gord Dibben MS Excel MVP
 
Gord Dibben said:
Data>Filter>Autofilter for 302 on Column B

Copy and paste the visible results to the other workbook.


Gord Dibben MS Excel MVP



Yes, I can do this. But is there a way that it can be automated with a formula instead of manually doing this?
 
Turn on the macro recorder and record yourself filtering, copying visible cells
and pasting to another workbook.

You will get something like this.

Sub Macro3()
'
' Macro3 Macro
' Macro recorded 04-19-2007 by Gord Dibben
'

'
Columns("A:F").Select
Selection.AutoFilter
Selection.AutoFilter Field:=3, Criteria1:="1Night"
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Workbooks.Open Filename:= _
"C:\program files\microsoft office\exceldata\copyfilter.xls"
ActiveSheet.Paste
Application.CutCopyMode = False
Range("A1").Select
End Sub


Gord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top