+ Reply to Thread
Results 1 to 5 of 5

Automatic Sheet Generation???

  1. #1
    Registered User
    Join Date
    07-19-2006
    Posts
    7

    Question Automatic Sheet Generation???

    Hi

    I have two sheets in my workbook that I need to search down through and pull data from to generate a third sheet, depending on whether the last cell in each row has a Yes or No.

    I had set this up manually with 'if' statements, worked fine when I had to only search 1 sheet, but now there's 2!

    Any ideas?

  2. #2
    Tom Ogilvy
    Guest

    RE: Automatic Sheet Generation???

    Sub ABC()
    Dim sh3 as Worksheet, sh as Worksheet
    Dim rng as Range, cell as Range, cell1 as Range
    Dim i as Long, rw as Long
    Set sh3 = Worksheets(3)
    rw = 2
    for i = 1 to 2
    set sh = worksheets(i)
    set rng = sh.range(sh.cells(2,1),sh.cells(rows.count,1))
    for each cell in rng
    set cell1 = sh.Cells(cell.row,"IV").End(xltoLeft)
    if lcase(cell1.Value) = "yes" then
    cell.EntireRow.copy sh3.Cells(rw,1)
    rw = rw + 1
    end if
    next
    Next
    end Sub

    --
    Regards,
    Tom Ogilvy

    "DarrenG" wrote:

    >
    > Hi
    >
    > I have two sheets in my workbook that I need to search down through and
    > pull data from to generate a third sheet, depending on whether the last
    > cell in each row has a Yes or No.
    >
    > I had set this up manually with 'if' statements, worked fine when I had
    > to only search 1 sheet, but now there's 2!
    >
    > Any ideas?
    >
    >
    > --
    > DarrenG
    > ------------------------------------------------------------------------
    > DarrenG's Profile: http://www.excelforum.com/member.php...o&userid=36529
    > View this thread: http://www.excelforum.com/showthread...hreadid=562825
    >
    >


  3. #3
    Graham Whitehead
    Guest

    Re: Automatic Sheet Generation???

    I'm sure this would be quite easy to do. However, without a specific
    example it's difficult to know exactly what your requirements are. Can you
    post an example workbook?

    "DarrenG" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi
    >
    > I have two sheets in my workbook that I need to search down through and
    > pull data from to generate a third sheet, depending on whether the last
    > cell in each row has a Yes or No.
    >
    > I had set this up manually with 'if' statements, worked fine when I had
    > to only search 1 sheet, but now there's 2!
    >
    > Any ideas?
    >
    >
    > --
    > DarrenG
    > ------------------------------------------------------------------------
    > DarrenG's Profile:
    > http://www.excelforum.com/member.php...o&userid=36529
    > View this thread: http://www.excelforum.com/showthread...hreadid=562825
    >




  4. #4
    Registered User
    Join Date
    07-19-2006
    Posts
    7

    Smile Sample Spreadsheet

    I've put together a sample of the Spreadsheet.

    You'll see 2 different problem areas with different data, feeding into a solution area.

    Based on whether a column is Yes or No, I would like this to happen automatically whenever the Workbook is open, and take the data from certain cells.

    Thanks

    - DarrenG
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-19-2006
    Posts
    7

    Question Actual Spreadsheet

    Here is the actual spreadsheet I'm working on.

    Anyone help?
    Attached Files Attached Files

+ 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