+ Reply to Thread
Results 1 to 3 of 3

copy rows based on several conditions

  1. #1
    Registered User
    Join Date
    02-09-2017
    Location
    israel
    MS-Off Ver
    2010
    Posts
    3

    copy rows based on several conditions

    hi
    I'm very VBA beginner
    I would glad to get your help

    I need write vba program which runs on sheet with fixed columns.
    where it is not known how many records have been added (so it cant get a number rows as constant parameter)
    this program check for every record if it meets the conditions - for example:
    the value in column A is bigger than 4 but smaller than 17
    the date in column B falls between last week.
    ....and more
    finally this program select the relevant rows from column A to U


    thanks u so much!!!!!

    Ben
    Last edited by benweizm; 02-09-2017 at 06:08 AM.

  2. #2
    Forum Contributor frabulator's Avatar
    Join Date
    09-16-2015
    Location
    United States
    MS-Off Ver
    2019
    Posts
    101

    Re: copy rows based on several conditions

    It sounds like you would like to look into if statements.

    However, if what you are wanting to do is something as simple as checking to see if something falls within a range you might not need to use vba. Check out this Microsoft page on how to use if statements inside of an Excel cell.

  3. #3
    Registered User
    Join Date
    02-09-2017
    Location
    israel
    MS-Off Ver
    2010
    Posts
    3

    Re: copy rows based on several conditions

    thanks for your reply
    but my problem is not "if" statement.
    my problems are:
    1. how the program can pass along all cells in the range which his end can be changed
    2. how can the program select rows selectively
    3. how can expand this selection to several columns of the relevant rows.
    4. how can I compare between dates

    thanks.

+ 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] Copy Past cut rows based on conditions to different sheets
    By moonbreakker in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-29-2015, 08:55 AM
  2. Copy rows based on 2 conditions
    By tooke in forum Excel General
    Replies: 0
    Last Post: 05-27-2015, 06:03 PM
  3. Copy rows from one worksheet to another, if certain conditions me
    By MaddyG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-16-2013, 10:46 PM
  4. Copy rows from one sheet to another based on 2 conditions
    By chrispulliam in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-23-2010, 01:38 AM
  5. copy rows based on values of 2 columns (2 conditions)
    By kingpeejay in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-02-2009, 04:53 PM
  6. Copy based on conditions
    By ebraun01 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-27-2006, 12:52 PM
  7. Copy Rows based on 2 conditions
    By Josh_123456 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-17-2005, 12:24 AM

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