+ Reply to Thread
Results 1 to 3 of 3

VBA code that finds data based on criteria, moves up two rows, copies cell to new sheet

  1. #1
    Registered User
    Join Date
    07-11-2015
    Location
    Jersey City, NJ
    MS-Off Ver
    2010
    Posts
    2

    VBA code that finds data based on criteria, moves up two rows, copies cell to new sheet

    Hi guys,

    I have a sheet which will constantly be changing. The sheet lists users and the users I need can be determined by a specific row that is 2 rows below their ID.

    Basically what I need is a VB script that will perform a find command for a specific phrase. Once it finds that phrase it will move up two rows (where the id is located), copy the data from that cell, paste it into the next cell on a second sheet, and then return to sheet one and continue performing the find command for the next instance of that specific phrase (skipping the one it just found before moving up 2 cells).

    As an example lets say the phrase is "This user" If the sheet were broken out like it is below, I basically need sheet2 to list Ryan, Aaron, and Mike on seperate rows (e.g. A1, B1, C1 on sheet2). Any help you can provide would be greatly appreciated.

    Ryan
    Ab1
    This User
    True

    Bob
    Ab2
    Not Him
    True

    Aaron
    Ab3
    This User
    False

    Eric
    Ab4
    Orange
    True

    Mike
    Ab5
    This User
    True

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA code that finds data based on criteria, moves up two rows, copies cell to new shee

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    07-11-2015
    Location
    Jersey City, NJ
    MS-Off Ver
    2010
    Posts
    2

    Re: VBA code that finds data based on criteria, moves up two rows, copies cell to new shee

    Thank you alphafrog, I'll have to try this tomorrow and see if it does the trick. I really appreciate your help.

+ 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. Replies: 1
    Last Post: 12-09-2015, 01:24 PM
  2. Questions about vba code that copies rows based on value in any cell
    By ammartino44 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-28-2014, 11:40 AM
  3. Vlookup that finds a match and copies the cell formatting as well
    By CSUF2009 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-11-2013, 12:38 AM
  4. Need Help Creating a Macro That Finds New Data and Copies it to Another Cell
    By fly91 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-16-2013, 09:14 PM
  5. VBA CODE to move rows from one sheet(1) to another sheet(2) based on data in cell
    By fozzieulo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-08-2013, 02:43 PM
  6. Replies: 5
    Last Post: 12-12-2012, 10:38 PM
  7. Copies entries on master sheet to specific tabs based on 2 criteria
    By kate8301 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-16-2011, 03:48 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