ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need a Quick answer on this one......... (https://www.excelbanter.com/excel-programming/300486-need-quick-answer-one.html)

Dan B

Need a Quick answer on this one.........
 
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



Marcotte A[_2_]

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

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

Untested, but should work.

chandlm[_16_]

Need a Quick answer on this one.........
 
Are you talking about any cell in COLUMN A matching any Cell in COLUMN
or C

Mat

--
Message posted from http://www.ExcelForum.com


Dana DeLouis[_3_]

Need a Quick answer on this one.........
 
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

"Dan B" wrote in message
...
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




chandlm[_17_]

Need a Quick answer on this one.........
 
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
he
A = A + 1

Loop

End Sub

Let me know if you need it do anything else

Cheers

--
Message posted from http://www.ExcelForum.com


Dan B

Need a Quick answer on this one.........
 
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(C 4,A$4:B$10,2,FALSE))

Thanks to all!



"Dan B" wrote in message
...
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





Dan B

Need a Quick answer on this one.........
 
Very Cool! I'll have to give this one a try too.
Thanks a lot!


"chandlm " wrote in message
...
Assuming you want to match with any cells in columns b and c this should
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
he
A = A + 1

Loop

End Sub

Let me know if you need it do anything else

Cheers,


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 12:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com