+ Reply to Thread
Results 1 to 4 of 4

Pulling data from one worksheet to another

  1. #1
    JoeJoe
    Guest

    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.


  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Try modifying this zip file i sent you, it has code and formula to achieve what you want!

    Regards,
    Simon
    Attached Files Attached Files

  3. #3
    JoeJoe
    Guest

    Re: Pulling data from one worksheet to another


    Simon Lloyd wrote:
    > Try modifying this zip file i sent you, it has code and formula to
    > achieve what you want!
    >
    > Regards,
    > Simon
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: Job Status.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=5214 |
    > +-------------------------------------------------------------------+
    >
    > --
    > Simon Lloyd
    > ------------------------------------------------------------------------
    > Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
    > View this thread: http://www.excelforum.com/showthread...hreadid=572431


    Simon - this is very helpful. I am having one problem though. When I
    run the Macro, it pastes the first name in the first empty cell within
    the designated column. How can I adjust the macro so I can specify the
    specific cell I want to start pasting at? Below is the macro I have
    adjusted thus far:

    Option Explicit

    Sub jobs()
    Dim mycell
    Dim rng As Range
    Dim rng1 As Range
    On Error Resume Next
    Set rng = Sheets("Dept_HC").Range("A1:A49")
    For Each mycell In rng
    If mycell.Offset(0, 8).Value = "0" Then
    mycell.Copy
    Sheets("Commentary").Select
    With Sheets("Commentary")
    Range("a2").Select
    Set rng1 = Range("a:a").End(xlDown)(2)
    rng1.Select
    End With
    ActiveSheet.Paste
    End If
    Next
    End Sub

    Thanks for your help


  4. #4
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    The macro assumes you have data in the first row like a heading or title as i have done in my demo for you if you type in a heading or title in A1 then it should work fine. You should remove the line On Error Resume Next

    Regards,
    Simon

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1