ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Pulling data from one worksheet to another (https://www.excelbanter.com/excel-worksheet-functions/105440-pulling-data-one-worksheet-another.html)

JoeJoe

Pulling data from one worksheet to another
 
Hello everyone - Im not sure if what I am trying to do requires Macro
programming, but here's what I am trying to accomplish.

I have a workbook with two worksheets. Worksheet "A" includes a column
(column A) with various job titles - one job title within each cell.
"A" also has a column (column B) which reflects either a 1 or a 0. The
1 indicates the role has been filled, the 0 indicates the role is open.

The other worksheet ("B") is meant for the business unit lead to
provide verbiage as to the reason the open role(s) is needed. What I
would like to happen automatically is for the bworksheet B to pull only
the job titles that are indicated with a 0.

Lets assume Worksheet A includes 100 rows of data. Ten of those rows
reflect open roles (indicated with a 0). I would like for Worksheet B
to pull only the job titles that are indicated with the 0. Thus,
Worksheet B would summarize this info within 10 rows.

Hopefully this makes sense. Any suggestions would be greatly
appreciated.


Bearacade

Pulling data from one worksheet to another
 

Try using this Macro:

Sub Macro1()

Sheets("A").Select
Range("A:B").Select
Selection.AutoFilter Field:=2, Criteria1:="0"
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Sheets("B").Select
Range("A1").Select
ActiveSheet.Paste

End Sub


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=572433


JoeJoe

Pulling data from one worksheet to another
 

Bearacade wrote:
Try using this Macro:

Sub Macro1()

Sheets("A").Select
Range("A:B").Select
Selection.AutoFilter Field:=2, Criteria1:="0"
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Sheets("B").Select
Range("A1").Select
ActiveSheet.Paste

End Sub


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=572433


This definitely has me going in the right direction, but here's what I
didnt describe very well initially.

Lets assume the 0's and 1's are in column "I". Lets also assume the
related names are in column "A". All I need to pull over to Worksheet B
are the names from column A. In addition, if I was to use a filter, I
would need it to automatically defeat at the end of the macro.

Thanks again for your help


Bearacade

Pulling data from one worksheet to another
 

Ok.. I can address the first two issue. I am not sure what you are
saying in regards to "automatically defeat at the end of the macro".
Do you mean to have the autofilter clear up after the macro is ran? I
have included that in the new Macro

Sub Macro1()

Sheets("A").Select
Cells.Select
Selection.AutoFilter Field:=9, Criteria1:="0"
Columns("A:A").Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Sheets("B").Select
Range("A1").Select
ActiveSheet.Paste
Sheets("A").Select
Selection.AutoFilter
Range("A1").Select

End Sub


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=572433



All times are GMT +1. The time now is 04:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com