Hi,
Is there a way to compare data in 2 columns, and display the same ones
that occur in both lists to a 3rd column?
Thanks.
Elaine.
Hi,
Is there a way to compare data in 2 columns, and display the same ones
that occur in both lists to a 3rd column?
Thanks.
Elaine.
Use a macro:-
Sub CompareAndPutinColumn3()
j = 1
For i = 1 To Application.WorksheetFunction.CountA(Columns(1))
If Application.WorksheetFunction.CountIf(Columns(2), Cells(i, 1)) >
0 Then
Cells(j, 3) = Cells(i, 1)
j = j + 1
End If
Next i
End Sub
somethinglikeant
elaine wrote:
> Hi,
>
> Is there a way to compare data in 2 columns, and display the same ones
> that occur in both lists to a 3rd column?
>
> Thanks.
> Elaine.
thanks!!!
somethinglikeant wrote:
> Use a macro:-
>
>
> Sub CompareAndPutinColumn3()
> j = 1
> For i = 1 To Application.WorksheetFunction.CountA(Columns(1))
> If Application.WorksheetFunction.CountIf(Columns(2), Cells(i, 1)) >
> 0 Then
> Cells(j, 3) = Cells(i, 1)
> j = j + 1
> End If
> Next i
> End Sub
>
> somethinglikeant
>
> elaine wrote:
>
> > Hi,
> >
> > Is there a way to compare data in 2 columns, and display the same ones
> > that occur in both lists to a 3rd column?
> >
> > Thanks.
> > Elaine.
thanks!!!
somethinglikeant wrote:
> Use a macro:-
>
>
> Sub CompareAndPutinColumn3()
> j = 1
> For i = 1 To Application.WorksheetFunction.CountA(Columns(1))
> If Application.WorksheetFunction.CountIf(Columns(2), Cells(i, 1)) >
> 0 Then
> Cells(j, 3) = Cells(i, 1)
> j = j + 1
> End If
> Next i
> End Sub
>
> somethinglikeant
>
> elaine wrote:
>
> > Hi,
> >
> > Is there a way to compare data in 2 columns, and display the same ones
> > that occur in both lists to a 3rd column?
> >
> > Thanks.
> > Elaine.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks