+ Reply to Thread
Results 1 to 3 of 3

Find data in other workbook with two conditions

  1. #1
    Registered User
    Join Date
    10-19-2020
    Location
    Tokyo, Japan
    MS-Off Ver
    365
    Posts
    98

    Find data in other workbook with two conditions

    Hello everyone

    I am trying to write a VBA macro that searches for the value of column A (Book A') in column A in Book B.
    If found I need to check if the value in column B of Book A and the found value in Book B also matches.
    If both values match, copy the value of column C (Book B) to column C (Book A)

    I think I can do that with 'find' if I would only have one condition, but how can I do this with two?

    Thanks in advance.
    Attached Files Attached Files
    Last edited by esukei; 12-25-2024 at 04:18 AM.

  2. #2
    Registered User
    Join Date
    10-19-2020
    Location
    Tokyo, Japan
    MS-Off Ver
    365
    Posts
    98

    Re: Find data in other workbook with two conditions

    Was able to solve it myself with something like this:

    Please Login or Register  to view this content.

  3. #3
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,026

    Re: Find data in other workbook with two conditions

    Here's one way...Both workbooks open...
    Please Login or Register  to view this content.
    PS...Your solution in post 2 does not represent your sample file setup...

    Can also be done without a loop...
    Please Login or Register  to view this content.
    Tx for rep +
    Last edited by Sintek; 12-25-2024 at 04:40 AM.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

+ 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. Copying Data from Another Workbook in Excel if certain conditions are met
    By PayamT in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-02-2021, 08:41 AM
  2. Replies: 3
    Last Post: 01-15-2019, 03:58 AM
  3. [SOLVED] Do_While loop to find data based on 2 conditions
    By mamaexcel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-15-2018, 10:52 AM
  4. Macro for copying data from one workbook to another under certain conditions
    By kitkat12 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 08-20-2015, 01:28 PM
  5. [SOLVED] Macro to find data in source workbook and copy paste to target workbook
    By D.Lovell in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 04-23-2014, 06:21 AM
  6. Data from workbook to another based on conditions
    By girkate in forum Excel General
    Replies: 1
    Last Post: 06-25-2010, 08:44 PM
  7. Find data in table from from two input conditions?
    By gdallas in forum Excel General
    Replies: 4
    Last Post: 02-11-2010, 12:31 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