+ Reply to Thread
Results 1 to 11 of 11

VBA - if three criterias match then copy/paste matching row value to another sheet

  1. #1
    Registered User
    Join Date
    03-08-2019
    Location
    Estonia
    MS-Off Ver
    MS Office 360
    Posts
    19

    VBA - if three criterias match then copy/paste matching row value to another sheet

    Hello, I've problem with the code that is shown below. The thing is that I have criteria brought out in one sheet which contains three values.

    Criterias in range of: sheets("Klaaside valik").range("A3:A11")

    matching values in range of: sheets("Sheet1").range("B3:D7")

    If all criterias match then I would like to have printed matching row value from column A to sheets("Klaaside valik").range("A14:A")

    The code I've written:
    Please Login or Register  to view this content.
    Example file:
    Last edited by VBwArrior; 04-23-2019 at 06:06 AM.

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,270

    Re: VBA - if three criterias match then copy/paste matching row value to another sheet

    Help me understand...

    Are you wanting to enter multiple items in Sheets("Klaaside valik") from range A3 to range C11 and search for all matches in sheet1 or just what is currently in row 3
    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 star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    03-08-2019
    Location
    Estonia
    MS-Off Ver
    MS Office 360
    Posts
    19

    Re: VBA - if three criterias match then copy/paste matching row value to another sheet

    Hi, yes, I would like to enter multiple items, but in case I add just one then result would be for one...

    Thanks!

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,270

    Re: VBA - if three criterias match then copy/paste matching row value to another sheet

    Please replace your current uploaded file with one that has the results expected posted....

    Give two entries at least...with the results...

  5. #5
    Registered User
    Join Date
    03-08-2019
    Location
    Estonia
    MS-Off Ver
    MS Office 360
    Posts
    19

    Re: VBA - if three criterias match then copy/paste matching row value to another sheet

    Did that, copy-copy is for you.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,569

    Re: VBA - if three criterias match then copy/paste matching row value to another sheet

    Try
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-08-2019
    Location
    Estonia
    MS-Off Ver
    MS Office 360
    Posts
    19

    Re: VBA - if three criterias match then copy/paste matching row value to another sheet

    There is still one problem...

    For example if I select "Insulated unit" that match with criteria and "insulated unit max thickness" that doesn't match then it still prints the name.

    basically the output should be the list that matches to every criteria.

    Is it possible to solve that?

    Thank you in advance!
    Last edited by VBwArrior; 04-23-2019 at 07:48 AM.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,569

    Re: VBA - if three criterias match then copy/paste matching row value to another sheet

    I don't understand what you are talking about.

    If you clear all the criteria and just select "insulated unit max thickness" in A3, with 3000, 2000, it clears the result.

  9. #9
    Registered User
    Join Date
    03-08-2019
    Location
    Estonia
    MS-Off Ver
    MS Office 360
    Posts
    19

    Re: VBA - if three criterias match then copy/paste matching row value to another sheet

    If I select max thickness or weight, it doesn't give any result.

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,569

    Re: VBA - if three criterias match then copy/paste matching row value to another sheet

    If you upload a workbook with the criteria and the EXACT result that you want, it may hel@.

  11. #11
    Registered User
    Join Date
    03-08-2019
    Location
    Estonia
    MS-Off Ver
    MS Office 360
    Posts
    19

    Re: VBA - if three criterias match then copy/paste matching row value to another sheet

    Everything OK now, I just needed to fill empty cells with zeros.

    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. VBA - copy paste specific values to range when 3 criterias match
    By VBwArrior in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-16-2019, 08:48 AM
  2. Replies: 1
    Last Post: 10-06-2017, 05:02 PM
  3. Macro: Copy/cut all rows matching criteria, and paste into specific Table/sheet
    By Andrewjs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2017, 03:55 PM
  4. [SOLVED] Userform for date entry and then copy/paste matching data to another sheet
    By nymanns in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-06-2013, 03:22 AM
  5. Replies: 1
    Last Post: 01-17-2013, 05:27 PM
  6. Copy Paste data with matching criteria from different sheet
    By Noor Hussain in forum Excel General
    Replies: 0
    Last Post: 06-14-2012, 01:23 AM
  7. VBA Search workbook for user value, copy/paste entire row to last sheet for matching
    By jasonkrispy21 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-22-2012, 03:42 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