+ Reply to Thread
Results 1 to 7 of 7

Copying certain instances to another sheet.

Hybrid View

Graham Pall Copying certain instances to... 11-20-2014, 12:05 PM
JOHN H. DAVIS Re: Copying certain instances... 11-20-2014, 12:11 PM
Graham Pall Re: Copying certain instances... 11-20-2014, 12:29 PM
JOHN H. DAVIS Re: Copying certain instances... 11-20-2014, 12:36 PM
Graham Pall Re: Copying certain instances... 11-26-2014, 05:10 AM
JOHN H. DAVIS Re: Copying certain instances... 11-26-2014, 07:12 AM
Graham Pall Re: Copying certain instances... 11-26-2014, 07:22 AM
  1. #1
    Registered User
    Join Date
    11-15-2013
    Location
    Newquay, Cornwall
    MS-Off Ver
    Excel 2010
    Posts
    67

    Copying certain instances to another sheet.

    Hi all,

    I have realised my previous request was a bit complicated and a bit tricky to understand without seeing the actual spreadsheet itself and what I was trying to achieve, and I have realised I was going about it the wrong way.

    What would be easier, is to copy the relevant information to the right sheet in the first place, instead of trying to delete off erroneous data after the fact.

    So, would someone be able to provide me with a small macro that......

    Copies all instances of "CH01_CONVERTING" in Column B to a on a sheet called "BACKLOG" to a new sheet (called CONVERTING BACKLOG), using an IF command (or any others if they work better?). It doesn't necessarily need to copy the header row, as that can be added afterwards.

    Many thanks in advance.


  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copying certain instances to another sheet.

    Maybe:

    Sub GrahamPall()
    Dim i As Long
    With Sheets("BACKLOG")
    For i = 2 To .Range("B" & Rows.Count).End(3).Row
        If .Cells(i, "B") = "CH01_CONVERTING" Then
            .Rows(i).Copy Sheets("CONVERTING BACKLOG").Range("A" & Rows.Count).End(3)(2)
        End If
    Next i
    End With
    End Sub

  3. #3
    Registered User
    Join Date
    11-15-2013
    Location
    Newquay, Cornwall
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Copying certain instances to another sheet.

    Sweet! Thanks John. Is there anything that can be included to keep the formatting of the first sheet on the second sheet?

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copying certain instances to another sheet.

    Can you attach a sample file with some dummy data to test on?

  5. #5
    Registered User
    Join Date
    11-15-2013
    Location
    Newquay, Cornwall
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Copying certain instances to another sheet.

    Only just got to have another look at this. Turns out there's no need, just recorded a small macro using format painter, and copied and pasted in, but thank you anyway John.

    John, can you recommend a good book/website for learning VBA for someone who already has a pretty solid computing background and want to use it in a manufacturing environment, producing reports/lists/figures etc.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copying certain instances to another sheet.

    Graham:

    This thread from the Forum should be of help.

    http://www.excelforum.com/excel-prog...materials.html

  7. #7
    Registered User
    Join Date
    11-15-2013
    Location
    Newquay, Cornwall
    MS-Off Ver
    Excel 2010
    Posts
    67

    Re: Copying certain instances to another sheet.

    Thanks John, much appreciated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Copying single instances of multiple names
    By andrewc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-01-2013, 04:56 AM
  2. VBA Find all instances of a specific string and copying the number of count in cell
    By dilshandil in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2013, 10:27 PM
  3. [SOLVED] Complex VLOOKUP, multiple instances vertical, return subsequent instances horizontally
    By Miles_2804 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-12-2013, 11:54 AM
  4. Copying all instances of a row match to another sheet
    By daedelous00 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2013, 01:30 PM
  5. Search for instances of X in a sheet
    By ThaPCdoc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-09-2005, 04:55 PM

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