0
votes

I don't usually come to Stack Overflow empty handed (without having VBA code) but I honestly don't know how to get the following idea to work.

I'm trying to build a raw data search engine which would work by setting 3 criteria in a box/cells on the side of the spreadsheet. The raw data contains sets of IDs in column (A) with various lengths, the search should run once for every set of IDs and look up whether it can match CRITERIA 1 & CRITERIA 2 to column (B) and whether it can match CRITERIA 3 to column (C).

If all three criteria match for one set of IDs then search engine should return "MATCH" in column (D)

see excel example here

Note note that ultimately the macro should be able to run the search on around 50'000 rows of data and for up to 5 criteria!

How can I start, or what functions should I use?

1
Sounds like COUNTIFS should work (though 50000 rows might bog down a bit...)BigBen
When you say "whether it can match CRITERIA 1 & CRITERIA 2 to column (B)" you mean OR not & right? None of column B has A and B in it...jamheadart
How can Criteria 1 & 2 be met for a certain row? And why does row 10 match the criteria? Or row 23?riskypenguin
@jamheadart I meant CRITERIA 1 and CRITERIA 2 have to both match. ID 111 both has both A's & B's same with ID 333Flohabenicht
Wondering this upvote, SO isn't a free coding service. @Flohabenicht did you at least tried something ? If yes can you please show us your code or the stuff that you tried ? Kindest regardsDorian

1 Answers

1
votes

I tried to recreate the same table than you. You can see that I don't need VBA for this. Use directly an IF with a combination of AND/OR, and autofill the column :)

enter image description here