View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Paige Paige is offline
external usenet poster
 
Posts: 270
Default URGENT ASSIST NEEDED IF POSSIBLE RE VLOOKUP/MATCH

Got both of these working - thanks to all of you!!! Just one quick question
for the next time I have to do this. If I want to put a message to the right
of each 'no match' (versus a message box), how would this be done?

"Paige" wrote:

Thanks to both of you - will try these....appreciate your help!

"Duke Carey" wrote:

For what it's worth, you can do this in Excel, but it's a task better suited
for a database.

One way in Excel is to concatenate the first pair of columns and compare
those values to the concatenation of the second pair of columns. So, in F1
use the formula

=A1&" - "&B1

and copy it down to the end of the data in the first 2 columns.

In cell G1 use the formula

=C1&" - "&D1

and copy it down to the of the data in those columns.

Now you can use a VLOOKUP formula along the lines of

=IF(ISNA(VLOOKUP(G1,F1:F50000,1,FALSE)),"Missing", "")

copy that down to the end of the data in column G. The ones that are
Missing will pop out.



"Paige" wrote:

PS: Forgot to say that (for example) a serial (in Col A) could have 40 rows
of types (in Col B), and the same serial (in Col C) could have 20 rows of
types (in Col D) or 150. A serial in Col A could start on row 450, and the
same serial in Col C may start on row 20, or row 1500.

"Paige" wrote:

I have the following, in 4 different columns:

Col A Col B Col C Col D
Serial Type Serial Type
12345 0475 12345 0475
12345 4394 12345 4850
12345 9800 12345 9800
49302 1929 49302 0493
49302 8473 49302 8747

I need to determine if there are any types in Col D that are NOT in Col B,
for the same serial (i.e., also matching Col A and C). Columns A/B have
about 50,000 rows; Columns C/D have about 27,000. Is there a way to do this
quickly with some VB code? I'm at a loss here and have to get this done by
end of today. Thanks for any help......Paige