+ Reply to Thread
Results 1 to 5 of 5

Select the first row where column B meets criteria

  1. #1
    Forum Contributor
    Join Date
    02-24-2010
    Location
    BC, Canada
    MS-Off Ver
    Excel 2010
    Posts
    174

    Question Select the first row where column B meets criteria

    Hi,

    I have a sheet that is sorted by column B. The values in that column look something like this:

    FLT0618
    FLT0620
    FLT0625
    FLT0630
    FLTB201
    FLTB202
    FLTC201
    FLTC202
    FLTE201
    FLTE202

    What I want to do is select all the rows after the last occurrence of FLT0* and cut those rows to paste on another sheet, so in this case it would be all the rows from FLTB201 to the end. There could be a variable number of rows with FLT0*, and FLTB201 may not always be the first row, ie, we may add an FLTA201 one day.

    How can VBA make this selection?
    Last edited by The Phil; 08-18-2016 at 04:13 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Select the first row where column B meets criteria

    You can use this :
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Select the first row where column B meets criteria

    Another approach, does the copy paste for you. You had mentioned wanting to copy the entire row, so this code does.

    Not sure where you want to paste, change the Sheet3 A1 values to suit your needs.

    Please Login or Register  to view this content.
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  4. #4
    Forum Contributor
    Join Date
    02-24-2010
    Location
    BC, Canada
    MS-Off Ver
    Excel 2010
    Posts
    174

    Re: Select the first row where column B meets criteria

    Excellent answers! Thank you.

  5. #5
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Select the first row where column B meets criteria

    You are most welcomed and thanks for the rep.

+ 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. Need one column total if criteria meets another columns criteria
    By jebrown in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-24-2013, 08:47 PM
  2. [SOLVED] copy select columns instead of entire row if it meets specific criteria
    By liz80 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-18-2012, 04:26 PM
  3. [SOLVED] Trying to count cells greater than # in one column if another column meets criteria
    By lorne17 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-14-2012, 07:01 PM
  4. [SOLVED] Create a formula to add cells in one column if it meets the criteria for another column
    By Tamarissa in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-23-2012, 11:27 AM
  5. Replies: 0
    Last Post: 07-22-2012, 01:05 PM
  6. Macro to select row if cell meets criteria
    By D_N_L in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-14-2012, 09:51 AM
  7. Finding the nth value if another column meets a criteria
    By crowfan65 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-07-2009, 06:53 AM
  8. Sum a column that meets two criteria
    By terrapinie in forum Excel General
    Replies: 6
    Last Post: 03-31-2005, 02:06 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