+ Reply to Thread
Results 1 to 5 of 5

Macro, to match criteria in one column and copies results into a new tab

  1. #1
    Forum Contributor
    Join Date
    11-11-2011
    Location
    London, England
    MS-Off Ver
    EXCEL 2013
    Posts
    324

    Macro, to match criteria in one column and copies results into a new tab

    Hey Guys

    I am looking for some help

    Aim – Create a macro, every time a row has the word “Internet” in column B(which the row will be highlighted in grey) i need the relevant rows below (In green)copied into a new spreadsheet in relation to that row

    For Example Row 156. This has the word internet
    i need row 156,157,158,159 copied to a new tab
    The macro needs to continue to row 160,and copy 160, 161,162 to the new tab and append to the bottom of the previous results etc etc
    I have copied desired results into a tab called “Results”

    Where it gets to row 182, “Card not present” it needs to skip until the word internet is found and the macro continue

    Thank you for taking your time at looking at my post ,

    Looking forward to your help

    Regards
    D
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro, to match criteria in one column and copies results into a new tab

    Sorry!
    It does not skip row 182.

    The output is in sheet2. Try it
    Attached Files Attached Files
    Last edited by AB33; 11-04-2013 at 07:57 AM.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro, to match criteria in one column and copies results into a new tab

    Amended to take out rows 182.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    11-11-2011
    Location
    London, England
    MS-Off Ver
    EXCEL 2013
    Posts
    324

    Re: Macro, to match criteria in one column and copies results into a new tab

    Hi AB33
    Thank you for your post
    Looking at the results, it seems to be pulling more values then necessary
    Macro Needs to look at column B, If any cell in grey says “internet” it need to return the green cells beneath it. If the following green cells says “-’E-COMMERCE” for eg all green cells below that need to be ignored.

    it only needs to valuate when a grey cell = internet

    looking at your vba code i can see you have got Like "-’CARD NOT PRESENT"
    I think this needs to be removed

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro, to match criteria in one column and copies results into a new tab

    Have you tried the amended code?
    The code does not look at cell colours, but at the word "Internet" and copies that row until the next word. It also excludes if the cell has a string ""-’CARD NOT PRESENT""

+ 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] need macro that prints sheets listed in column a and the # of copies i want in column b
    By ffxmp0 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-10-2012, 11:22 PM
  2. [SOLVED] Macro that searches and copies multiple results
    By tberry in forum Excel Programming / VBA / Macros
    Replies: 33
    Last Post: 06-18-2012, 03:03 PM
  3. Replies: 0
    Last Post: 03-02-2012, 11:16 AM
  4. Need a code that looks at the results of a formula in column A and copies row
    By AndyMay in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-29-2012, 04:07 PM
  5. Looking for a macro that copies a formula from column to column as I change the month
    By caliskier in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-18-2007, 03:32 PM

Tags for this Thread

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