+ Reply to Thread
Results 1 to 6 of 6

Finding Criteria and copying data

  1. #1
    Registered User
    Join Date
    02-02-2011
    Location
    Ft Lewis, WA
    MS-Off Ver
    Excel 2003
    Posts
    25

    Finding Criteria and copying data

    Hello everyone.

    I have a value in Sheet6.(A1). I need to search Sheet5 Column ("BA") for that number or as close to that number as possible, then take the data on the corresponding row in column "BE" and copy it to sheet6 Column Z. For example if Sheet6(A1) is 17, then search Sheet5 Column (BA) for that number or the closest match. 18 appears in cel BA11 in sheet5 column (BA) which is the closest to 17. Then take the data sarting on row 11 column BE and copy to sheet6 column z.

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

    Re: Finding Criteria and copying data

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-02-2011
    Location
    Ft Lewis, WA
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Finding Criteria and copying data

    Hi I am getting a variable not defined on ws5, ws6 and openrow

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

    Re: Finding Criteria and copying data

    Edit: You may have Option Explicit set up. In that case, either delete that line, or define ALL the variables in the code.

    Otherwise, make sure "Sheet5" and "Sheet6" are what the worksheets are actually named (the tab names).

    If option explicit, add this right after the sub name:

    Please Login or Register  to view this content.
    Last edited by walruseggman; 03-04-2015 at 03:48 PM.

  5. #5
    Registered User
    Join Date
    02-02-2011
    Location
    Ft Lewis, WA
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Finding Criteria and copying data

    @walruseggman I think I am not explaining it well to you. I have attached a sample book on what I am trying to do. The sheets and references cells are a bit different.

    1. On Sheet6 Cell A1 I need to take that number and find the closest first time instance match from Sheet4 column "Z", which in the sample is Z10, then take the data from E10 to X10 all the way down to X53, highlighted in yellow, and copy that data starting on Sheet 6 M3.
    Last edited by wxdonar; 03-04-2015 at 04:20 PM.

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

    Re: Finding Criteria and copying data

    I don't see an attached workbook?

+ 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: 4
    Last Post: 01-08-2013, 12:37 PM
  2. Finding and copying data
    By Gavo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-21-2012, 12:27 PM
  3. Finding and copying rows that meet key word criteria
    By acrobaticgod in forum Excel General
    Replies: 12
    Last Post: 10-29-2011, 05:35 PM
  4. Finding and copying multiple criteria using macro
    By Kotler in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-28-2011, 03:41 PM
  5. finding criteria then copying columns between sheets
    By samoolol in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-18-2011, 07:25 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