Need a Quick answer on this one.........

D

Dan B

I have three columns of numbers....I need to find exact matches between 2 of
them. If a match is found I need to copy a number from the other column to
an empty column. For example, if any number in column B matches any number
in column C, then copy the number in A (next to the match it found in B) to
column D.

I hope that makes sense.

Thanks,
Dan
 
M

Marcotte A

Try,

=IF(A1=B1,C1,IF(A1=C1,B1,IF(B1=C1,A1,"No Match")))

Untested, but should work.
 
C

chandlm

Are you talking about any cell in COLUMN A matching any Cell in COLUMN
or C

Mat
 
D

Dana DeLouis

On possible "quick" solution might be the following. However, this returns
an #N/A error if all numbers are unique. Not sure how you want to handle
that. This looks at the three numbers in A1:C1

=SUM(A1:C1)-2*MODE(A1:C1)

HTH
Dana DeLouis
 
C

chandlm

Assuming you want to match with any cells in columns b and c this shoul
do what you want.

Sub find_match()
A = 1
Do Until IsEmpty(Range("a" & A).Value)
Range("b65536").End(xlUp).Select
Range(Selection, Selection.End(xlUp)).Select


'Columns("B:B").Select
For Each cell In Selection

If Range("a" & A).Value = cell Then
Range("d" & cell.Row).Value = Range("a" & A).Value

GoTo here
End If
Next
Range("c65536").End(xlUp).Select
Range(Selection, Selection.End(xlUp)).Select
For Each cell In Selection

If Range("a" & A).Value = cell Then
Range("d" & cell.Row).Value = Range("a" & A).Value

GoTo here

End If
Next
here:
A = A + 1

Loop

End Sub

Let me know if you need it do anything else

Cheers
 
D

Dan B

Thanks for all the help. After some rearranging of data, and help from
another post, I got it to work with this formula:
=IF(ISNA(VLOOKUP(C4,A$4:B$10,2,FALSE)),0,VLOOKUP(C4,A$4:B$10,2,FALSE))

Thanks to all!
 
Top