+ Reply to Thread
Results 1 to 10 of 10

VBA: Lookin up multiple criteria in 2 columns only on the last row.

  1. #1
    Registered User
    Join Date
    12-22-2014
    Location
    Netherlands
    MS-Off Ver
    O365
    Posts
    58

    VBA: Lookin up multiple criteria in 2 columns only on the last row.

    Hi there,

    i have tried many things but errors keep popping up.
    currently i have this code and this works well but it only works well for 1 criteria.

    the criteria searched is inside a combobox called CB_shuttlenr.
    this will be looked at inside the last row and a certain column and if it is found an msgbox will be thrown with allready exists please choose another.

    i would love to setup a second criteria with a second textbox called TB_date. and if BOTH these criteria's are met at the bottom of the row than the error needs to be thrown.
    if 1 is matched but not the other than do nothing.

    Could someone please guide me?


    Please Login or Register  to view this content.
    greetings,

    Aaron

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA: Lookin up multiple criteria in 2 columns only on the last row.

    Because search wirh dates is always a bit tricky, please attach an EXCEL file to be clear about data, columns etc ...
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    12-22-2014
    Location
    Netherlands
    MS-Off Ver
    O365
    Posts
    58

    Re: VBA: Lookin up multiple criteria in 2 columns only on the last row.

    i have the file attached
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA: Lookin up multiple criteria in 2 columns only on the last row.

    Thx for the file.
    What is the sheet where to search?
    What the column for the second Find ?

  5. #5
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA: Lookin up multiple criteria in 2 columns only on the last row.

    See next code, adjust Const to your need
    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Hi !

    Quote Originally Posted by PCI View Post
    Because search wirh dates is always a bit tricky […]
    No issue just if Logic is respected …

  7. #7
    Registered User
    Join Date
    12-22-2014
    Location
    Netherlands
    MS-Off Ver
    O365
    Posts
    58
    Quote Originally Posted by PCI View Post
    See next code, adjust Const to your need
    Please Login or Register  to view this content.
    Thanks man,

    Gonna try this tomorrow morning.
    By the looks of it. It's gonna work

    Good evening !

  8. #8
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA: Lookin up multiple criteria in 2 columns only on the last row.

    Thanks for the file, this is the key of the success

  9. #9
    Registered User
    Join Date
    12-22-2014
    Location
    Netherlands
    MS-Off Ver
    O365
    Posts
    58

    Re: VBA: Lookin up multiple criteria in 2 columns only on the last row.

    Thanks man,

    I got it working right away after tweaking some stuff
    Thanks for your help.


    This is the code for future reference.
    (deleted the Option explicit cause the rest of my vba code isn't setup as this)
    Please Login or Register  to view this content.
    again thanks alot

  10. #10
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA: Lookin up multiple criteria in 2 columns only on the last row.

    Super and thanks for the Rep.
    Enjoy EXCEL

+ 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] Pulling info from multiple possible columns using multiple criteria columns
    By Barren_Wuffett in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-08-2019, 05:37 PM
  2. Pulling single cell from multiple possible columns using multiple criteria columns
    By Barren_Wuffett in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-05-2019, 09:24 AM
  3. [SOLVED] Lookup multiple criteria in multiple columns in multiple rows; return true if exists
    By ufdlim in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-07-2019, 02:03 PM
  4. Add Multiple Columns based on same criteria found in multiple columns
    By KathyBNelson in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-29-2014, 04:42 PM
  5. [SOLVED] UDF for sum of multiple criteria in multiple columns and single criteria in multiple colum
    By Ganesh7299 in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 11-22-2013, 04:26 AM
  6. [SOLVED] Sum Multiple Columns if successful criteria are matched in multiple columns
    By dharmeshchavda in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-03-2013, 11:02 PM
  7. Replies: 2
    Last Post: 10-05-2011, 12:43 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